mirror of
https://codeberg.org/scip/Config-General.git
synced 2025-12-16 20:21:01 +01:00
2.29
- applied patch by brian@kronos.com via rt.cpan.org #11211. - applied patch by plasmaball@pchome.com.tw via rt.cpan.org #5846 - added new files to MANIFEST file. - added example.cfg to show the config format. git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@55 be1acefe-a474-0410-9a34-9b3221f2030f
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
#
|
||||
|
||||
package Config::General::Interpolated;
|
||||
$Config::General::Interpolated::VERSION = "2.04";
|
||||
$Config::General::Interpolated::VERSION = "2.05";
|
||||
|
||||
use strict;
|
||||
use Carp;
|
||||
@@ -85,12 +85,13 @@ sub _interpolate {
|
||||
$value =~ s{$this->{regex}}{
|
||||
my $con = $1;
|
||||
my $var = $3;
|
||||
$var = lc($var) if $this->{LowerCaseNames};
|
||||
if (exists $this->{stack}->{ $this->{level} }->{ $prevkey }->{$var}) {
|
||||
$con . $this->{stack}->{ $this->{level} }->{ $prevkey }->{$var};
|
||||
}
|
||||
else {
|
||||
if ($this->{StrictVars}) {
|
||||
croak "Use of uninitialized variable \$" . $var . "\n";
|
||||
croak "Use of uninitialized variable (\$$var) while loading config entry: $key = $value\n";
|
||||
}
|
||||
else {
|
||||
# be cool
|
||||
@@ -114,15 +115,17 @@ sub _interpolate_hash {
|
||||
#
|
||||
my ($this, $config) = @_;
|
||||
|
||||
$this->{level} = 1;
|
||||
$this->{upperkey} = "";
|
||||
$this->{lastkey} = "";
|
||||
$this->{prevkey} = " ";
|
||||
$this->{level} = 1;
|
||||
$this->{upperkey} = "";
|
||||
$this->{upperkeys} = [];
|
||||
$this->{lastkey} = "";
|
||||
$this->{prevkey} = " ";
|
||||
|
||||
$config = $this->_var_hash_stacker($config);
|
||||
|
||||
$this->{level} = 1;
|
||||
$this->{upperkey} = "";
|
||||
$this->{upperkeys} = [];
|
||||
$this->{lastkey} = "";
|
||||
$this->{prevkey} = " ";
|
||||
|
||||
@@ -296,7 +299,7 @@ See L<http://www.perl.com/perl/misc/Artistic.html>
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
2.04
|
||||
2.05
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
Reference in New Issue
Block a user