summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-perl/AppConfig/files
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-perl/AppConfig/files')
-rw-r--r--dev-perl/AppConfig/files/blockdiffs.patch83
1 files changed, 83 insertions, 0 deletions
diff --git a/dev-perl/AppConfig/files/blockdiffs.patch b/dev-perl/AppConfig/files/blockdiffs.patch
new file mode 100644
index 000000000000..2e30310a8884
--- /dev/null
+++ b/dev-perl/AppConfig/files/blockdiffs.patch
@@ -0,0 +1,83 @@
+diff -Naurp AppConfig-1.65.orig/lib/AppConfig/File.pm AppConfig-1.65/lib/AppConfig/File.pm
+--- AppConfig-1.65.orig/lib/AppConfig/File.pm 2007-05-30 07:24:09.000000000 -0400
++++ AppConfig-1.65/lib/AppConfig/File.pm 2007-06-09 07:08:21.000000000 -0400
+@@ -38,6 +38,7 @@ sub new {
+ STATE => $state, # AppConfig::State ref
+ DEBUG => $state->_debug(), # store local copy of debug
+ PEDANTIC => $state->_pedantic, # and pedantic flags
++ BLOCKSEP => $state->_blocksep, # and block separator
+ };
+
+ bless $self, $class;
+@@ -80,7 +81,7 @@ sub parse {
+ my $flag;
+
+ # take a local copy of the state to avoid much hash dereferencing
+- my ($state, $debug, $pedantic) = @$self{ qw( STATE DEBUG PEDANTIC ) };
++ my ($state, $debug, $pedantic, $blocksep) = @$self{ qw( STATE DEBUG PEDANTIC BLOCKSEP ) };
+
+ # we want to install a custom error handler into the AppConfig::State
+ # which appends filename and line info to error messages and then
+@@ -163,7 +164,7 @@ sub parse {
+ s/\s+$//;
+
+ # look for a [block] to set $prefix
+- if (/^\[([^\]]+)\]$/) {
++ if (/^\[\s*([^\]\s]+)\s*\]$/) {
+ $prefix = $1;
+ print STDERR "Entering [$prefix] block\n" if $debug;
+ next;
+@@ -194,7 +195,7 @@ sub parse {
+ $flag = $1;
+
+ # $variable gets any $prefix
+- $variable = $prefix . '_' . $variable
++ $variable = $prefix . $blocksep . $variable
+ if length $prefix;
+
+ # if the variable doesn't exist, we call set() to give
+diff -Naurp AppConfig-1.65.orig/lib/AppConfig/State.pm AppConfig-1.65/lib/AppConfig/State.pm
+--- AppConfig-1.65.orig/lib/AppConfig/State.pm 2007-05-30 07:24:20.000000000 -0400
++++ AppConfig-1.65/lib/AppConfig/State.pm 2007-06-09 07:11:16.000000000 -0400
+@@ -53,7 +53,7 @@ my %METHVARS;
+
+ # internal values that AUTOLOAD should provide access to
+ my %METHFLAGS;
+- @METHFLAGS{ qw( PEDANTIC ) } = ();
++ @METHFLAGS{ qw( PEDANTIC BLOCKSEP ) } = ();
+
+ # variable attributes that may be specified in GLOBAL;
+ my @GLOBAL_OK = qw( DEFAULT EXPAND VALIDATE ACTION ARGS ARGCOUNT );
+@@ -94,6 +94,7 @@ sub new {
+ PEDANTIC => 0, # return immediately on parse warnings
+ EHANDLER => undef, # error handler (let's hope we don't need it!)
+ ERROR => '', # error message
++ BLOCKSEP => '_', # separator between [block] and variable name
+ };
+
+ bless $self, $class;
+@@ -504,8 +505,8 @@ sub _configure {
+ next;
+ };
+
+- # CASE, CREATE and PEDANTIC are stored as they are
+- $opt =~ /^CASE|CREATE|PEDANTIC$/i && do {
++ # CASE, CREATE, PEDANTIC and BLOCKSEP are stored as they are
++ $opt =~ /^CASE|CREATE|PEDANTIC|BLOCKSEP$/i && do {
+ $self->{ uc $opt } = $cfg->{ $opt };
+ next;
+ };
+@@ -1015,6 +1016,13 @@ instantiated with a reference to an App:
+ DEBUG (and also PEDANTIC) values of the state at that time. Subsequent
+ changes to the AppConfig::State debug value will not affect them.
+
++=item BLOCKSEP
++
++When parsing configuration files that are grouped using constructions
++like [block], this string parameter determines what is used to
++separate the name of the block from the name of each variable
++contained within it. If unspecified, BLOCKSEP defaults to '_'.
++
+ =item GLOBAL
+
+ The GLOBAL option allows default values to be set for the DEFAULT, ARGCOUNT,