- applied patch by Michael Gray <mjg17@eng.cam.ac.uk> which
	   fixes a bug in the Interpolate.pm submodule. A second variable,
	   when immediately following the first, did not get interpolated,
	   i.e. ${var1}${var2}.


git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@42 be1acefe-a474-0410-9a34-9b3221f2030f
This commit is contained in:
Thomas von Dein
2009-10-10 16:26:58 +00:00
parent 5e99e1f8b2
commit 4575d2a052
4 changed files with 23 additions and 16 deletions

View File

@@ -1,5 +1,5 @@
package Config::General::Interpolated;
$Config::General::Interpolated::VERSION = "2.01";
$Config::General::Interpolated::VERSION = "2.02";
use strict;
use Carp;
@@ -33,16 +33,17 @@ sub _set_regex {
# <autrijus@autrijus.org>, and I made some modifications.
# thanx, autrijus. :)
my $regex = qr{
(^|[^\\]) # $1: can be the beginning of the line
# but can't begin with a '\'
\$ # dollar sign
(\{)? # $2: optional opening curly
([a-zA-Z_]\w*) # $3: capturing variable name
(
?(2) # $4: if there's the opening curly...
\} # ... match closing curly
)
}x;
(^|\G|[^\\]) # $1: can be the beginning of the line
# or the beginning of next match
# but can't begin with a '\'
\$ # dollar sign
(\{)? # $2: optional opening curly
([a-zA-Z_]\w*) # $3: capturing variable name
(
?(2) # $4: if there's the opening curly...
\} # ... match closing curly
)
}x;
return $regex;
}