mirror of
https://codeberg.org/scip/Config-General.git
synced 2025-12-17 04:31:00 +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).
|
2.03 - fixed bug in the _parse() routine (better: design flaw).
|
||||||
after the last patch for allowing whitespaces in
|
after the last patch for allowing whitespaces in
|
||||||
option names, it had a problem with here-docs which
|
option names, it had a problem with here-docs which
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
package Config::General::Interpolated;
|
package Config::General::Interpolated;
|
||||||
$Config::General::Interpolated::VERSION = "1.3";
|
$Config::General::Interpolated::VERSION = "1.4";
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use Carp;
|
use Carp;
|
||||||
@@ -70,9 +70,15 @@ sub _vars {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$value =~ s{$this->{regex}}{
|
$value =~ s{$this->{regex}}{
|
||||||
my $v = $varstack{$3} || $stack->{$3};
|
my $con = $1;
|
||||||
$v = '' if ref($v);
|
my $var = $3;
|
||||||
$1 . $v;
|
my $v = $varstack{$var} || $stack->{$var};
|
||||||
|
if (defined $v) {
|
||||||
|
$con . $v;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
croak "Use of uninitialized variable \$" . $var . "\n";
|
||||||
|
}
|
||||||
}egx;
|
}egx;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -210,7 +216,7 @@ See L<http://www.perl.com/perl/misc/Artistic.html>
|
|||||||
|
|
||||||
=head1 VERSION
|
=head1 VERSION
|
||||||
|
|
||||||
1.3
|
1.4
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user