mirror of
https://codeberg.org/scip/Config-General.git
synced 2025-12-16 20:21:01 +01:00
2.16
- 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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user