mirror of
https://codeberg.org/scip/Config-General.git
synced 2025-12-16 20:21:01 +01:00
2.04 - added RFE from rt.cpan.org (ID: 1218). the ::Interpolate
module populates now uses of uninitialized variables in config files itself instead of just letting perl die(). The other suggestion of the RFE was declined. git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@30 be1acefe-a474-0410-9a34-9b3221f2030f
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2.04 - added RFE from rt.cpan.org (ID: 1218). the ::Interpolate
|
||||
module populates now uses of uninitialized variables in
|
||||
config files itself instead of just letting perl die().
|
||||
The other suggestion of the RFE was declined.
|
||||
|
||||
2.03 - fixed bug in the _parse() routine (better: design flaw).
|
||||
after the last patch for allowing whitespaces in
|
||||
option names, it had a problem with here-docs which
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package Config::General::Interpolated;
|
||||
$Config::General::Interpolated::VERSION = "1.3";
|
||||
$Config::General::Interpolated::VERSION = "1.4";
|
||||
|
||||
use strict;
|
||||
use Carp;
|
||||
@@ -70,9 +70,15 @@ sub _vars {
|
||||
}
|
||||
else {
|
||||
$value =~ s{$this->{regex}}{
|
||||
my $v = $varstack{$3} || $stack->{$3};
|
||||
$v = '' if ref($v);
|
||||
$1 . $v;
|
||||
my $con = $1;
|
||||
my $var = $3;
|
||||
my $v = $varstack{$var} || $stack->{$var};
|
||||
if (defined $v) {
|
||||
$con . $v;
|
||||
}
|
||||
else {
|
||||
croak "Use of uninitialized variable \$" . $var . "\n";
|
||||
}
|
||||
}egx;
|
||||
}
|
||||
|
||||
@@ -210,7 +216,7 @@ See L<http://www.perl.com/perl/misc/Artistic.html>
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
1.3
|
||||
1.4
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
Reference in New Issue
Block a user