- applied patch by Branislav Zahradnik
	   <brano@blueorange.sk> which adds -InterPolateEnv.
	   This allows to use environment variables too. It
	   implies -InterPolateVars.

	 - added object list capability for the ::Extended::obj()
	   method. If a certain key points to an array of
	   hashrefs, then the whole arrayref is returned.
	   Suggested by Alan Hodgkinson <alan@softxs.ch>.


git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@56 be1acefe-a474-0410-9a34-9b3221f2030f
This commit is contained in:
Thomas von Dein
2009-10-10 16:35:18 +00:00
parent ef504ee7f4
commit 57244f6eea
5 changed files with 147 additions and 15 deletions

View File

@@ -8,7 +8,7 @@
#
package Config::General::Interpolated;
$Config::General::Interpolated::VERSION = "2.05";
$Config::General::Interpolated::VERSION = "2.06";
use strict;
use Carp;
@@ -89,6 +89,10 @@ sub _interpolate {
if (exists $this->{stack}->{ $this->{level} }->{ $prevkey }->{$var}) {
$con . $this->{stack}->{ $this->{level} }->{ $prevkey }->{$var};
}
elsif ($this->{InterPolateEnv}) {
# may lead to vulnerabilities, by default flag turned off
$con . $ENV{$var};
}
else {
if ($this->{StrictVars}) {
croak "Use of uninitialized variable (\$$var) while loading config entry: $key = $value\n";
@@ -299,7 +303,7 @@ See L<http://www.perl.com/perl/misc/Artistic.html>
=head1 VERSION
2.05
2.06
=cut