Skip Menu |

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

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

People
Owner: tlinden [...] cpan.org
Requestors: DAMI [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 2.49
Fixed in: (no value)



Subject: perl5.12.1 warns about defined(%ENV) in Interpolated.pm
Under perl 5.12.1 we get the following warning message : defined(%hash) is deprecated at D:/strawberry/perl/site/lib/Config/General/Interpolated.pm line 127. (Maybe you should just omit the defined()?)
defined %HASH is supposed to be replaced with %HASH, which does more of what you probably meant. In this case defined %ENV is unnecessary since %ENV is tied I believe. regardless, keys %ENV will happily come back as 0 if it ever happens. Patch attached for fix.
Subject: patch.txt
diff --git a/General/Interpolated.pm b/General/Interpolated.pm index e0d6f63..aaef6b7 100644 --- a/General/Interpolated.pm +++ b/General/Interpolated.pm @@ -124,7 +124,7 @@ sub _interpolate_hash { my ($this, $config) = @_; # bugfix rt.cpan.org#46184, moved code from _interpolate() to here. - if ($this->{InterPolateEnv} && defined(%ENV)) { + if ($this->{InterPolateEnv}) { # may lead to vulnerabilities, by default flag turned off for my $key (keys %ENV){ $config->{__stack}->{$key}=$ENV{$key};
Test and fix committed to SVN svn diff -r88:90 http://dev.catalyst.perl.org/repos/Config-General/trunk
thanks, release with 2.50