2.08 - added option -StrictVars, which causes Interpolate.pm to

ignore undefined variables and replaces such occurences
	   with the emppty string.

	 - applied patch by Stefan Moser <sm@open.ch>, which fixes
	   some weird bevavior if -MergeDuplicateOptions was turned
	   on, the parser croaked regardless -MergeDuplicateBlocks
	   was set or not. Now the two options behave almost independent
	   from each other, which allows one to merge duplicate
	   blocks but duplicate options not.

	 - changed behavior of setting -MergeDuplicateOptions which
	   implied in previous versions -AllowMultiOptions to be
	   false. Now this will only be done if the user does not
	   set -AllowMultiOptions by himself. This allows one to
	   have duplicate blocks which will be turned into an
	   array but duplicate options to be merged.

	 - applied patch by Matthias Pitzl <matthias@izb.net>, which	
	   fixes a bug at parsing apache-like include directive
	   (Include ...). It did not properly trim unnecessary whitespaces
	   so that the filename to be included became invalid. This
	   bug espessially occurred if one saved a hash containing
	   a key/value pair like this: "Include" => "/etc/grs.cfg",
	   which was then saved as "Include   /etc/grs.cfg", the
	   parser returned "  /etc/grs.cfg" which, of course, does
	   not exists. odd...


git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@34 be1acefe-a474-0410-9a34-9b3221f2030f
This commit is contained in:
Thomas von Dein
2009-10-10 16:24:01 +00:00
parent 41b311f7a0
commit e3ca417573
4 changed files with 73 additions and 28 deletions

View File

@@ -1,5 +1,5 @@
package Config::General::Interpolated;
$Config::General::Interpolated::VERSION = "1.4";
$Config::General::Interpolated::VERSION = "1.5";
use strict;
use Carp;
@@ -77,7 +77,13 @@ sub _vars {
$con . $v;
}
else {
croak "Use of uninitialized variable \$" . $var . "\n";
if ($this->{StrictVars}) {
croak "Use of uninitialized variable \$" . $var . "\n";
}
else {
# be cool
$con;
}
}
}egx;
}
@@ -216,7 +222,7 @@ See L<http://www.perl.com/perl/misc/Artistic.html>
=head1 VERSION
1.4
1.5
=cut