Subject: | Cannot interpolate variables with LowerCaseNames set |
If -LowerCaseNames and -InterPolateVars options are both set, and there are variables in a config file, then an error occurs:
Use of uninitialized variable $SomeName
Config::General::Interpolated::_interpolate('Config::General::Interpolated=HASH(0x84f9b08)','source','$SomeName) called at /usr/local/lib/perl5/site_perl/5.8.2/Config/General.pm line 758
This is because every varaible name is lc'ed, but C::G::Interpolated isn't aware of -LowerCaseNames flag. The attached patch makes C::G::I be aware of -LowerCaseNames flag.
plasma
--- Interpolated.pm.orig Wed Mar 31 13:51:09 2004
+++ Interpolated.pm Wed Mar 31 13:51:49 2004
@@ -76,6 +76,7 @@
$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};
}