Skip Menu |

This queue is for tickets about the Config-General CPAN distribution.

Report information
The Basics
Id: 5846
Status: resolved
Priority: 0/
Queue: Config-General

People
Owner: Nobody in particular
Requestors: plasmaball [...] pchome.com.tw
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.26
Fixed in: (no value)



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}; }
RT doesn't notify me about new tickets, sorry for the late reply
I applied the patch, thanks a lot. Tom