mirror of
https://codeberg.org/scip/Config-General.git
synced 2025-12-16 20:21:01 +01:00
2.30
- 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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user