- fixed Bug #3869 (rt.cpan.org) reported by
	   "Mike Depot" <mdepot@comcast.net>

	 - applied patch by Roland Huss <Roland.Huss@consol.de>,
	   which fixes a bug with the -Tie option, sub-hashes of
	   named blocks were not properly created (in fact, not
	   tied).

	 - added documentation to Interpolated.pm that it does not
	   interpolate variables in keys, see bug #3773 (rt.cpan.org).


git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@50 be1acefe-a474-0410-9a34-9b3221f2030f
This commit is contained in:
Thomas von Dein
2009-10-10 16:29:34 +00:00
parent 577e668192
commit 2a0006a8d8
4 changed files with 31 additions and 10 deletions

View File

@@ -1,3 +1,16 @@
2.24
- fixed Bug #3869 (rt.cpan.org) reported by
"Mike Depot" <mdepot@comcast.net>
- applied patch by Roland Huss <Roland.Huss@consol.de>,
which fixes a bug with the -Tie option, sub-hashes of
named blocks were not properly created (in fact, not
tied).
- added documentation to Interpolated.pm that it does not
interpolate variables in keys, see bug #3773 (rt.cpan.org).
2.23 2.23
- still versioning problem, stupid white man ;-) - still versioning problem, stupid white man ;-)
Extended.pm is now 2.00 which *is* higher than 1.10. Extended.pm is now 2.00 which *is* higher than 1.10.
@@ -20,7 +33,7 @@
sets $/ if it is unset. sets $/ if it is unset.
- added patch by David Dick <david_dick@iprimus.com.au> which - added patch by David Dick <david_dick@iprimus.com.au> which
calls the bindmode() function in case the modules is being calls the binmode() function in case the modules is being
used under win32 systems. Read perldoc -f binmode for more used under win32 systems. Read perldoc -f binmode for more
informations on this issue. informations on this issue.

View File

@@ -18,7 +18,7 @@ use strict;
use Carp; use Carp;
use Exporter; use Exporter;
$Config::General::VERSION = "2.23"; $Config::General::VERSION = "2.24";
use vars qw(@ISA @EXPORT); use vars qw(@ISA @EXPORT);
@ISA = qw(Exporter); @ISA = qw(Exporter);
@@ -170,7 +170,7 @@ sub new {
} }
else { else {
# this happens if $#param == -1,1 thus no param was given to new! # this happens if $#param == -1,1 thus no param was given to new!
$self->{config} = $this->_hashref(); $self->{config} = $self->_hashref();
$self->{parsed} = 1; $self->{parsed} = 1;
} }
@@ -611,6 +611,10 @@ sub _parse {
else { # calling myself recursively, end of $block reached, $block_level is 0 else { # calling myself recursively, end of $block reached, $block_level is 0
if ($blockname) { # a named block, make it a hashref inside a hash within the current node if ($blockname) { # a named block, make it a hashref inside a hash within the current node
$this->_savelast($blockname); $this->_savelast($blockname);
$config->{$block} = $this->_hashref() # Make sure that the hash is not created implicitely
unless exists $config->{$block};
if (exists $config->{$block}->{$blockname}) { # the named block already exists, make it an array if (exists $config->{$block}->{$blockname}) { # the named block already exists, make it an array
if ($this->{MergeDuplicateBlocks}) { if ($this->{MergeDuplicateBlocks}) {
# just merge the new block with the same name as an existing one into # just merge the new block with the same name as an existing one into
@@ -1928,7 +1932,7 @@ Thomas Linden <tom@daemon.de>
=head1 VERSION =head1 VERSION
2.23 2.24
=cut =cut

View File

@@ -1,5 +1,5 @@
package Config::General::Interpolated; package Config::General::Interpolated;
$Config::General::Interpolated::VERSION = "2.03"; $Config::General::Interpolated::VERSION = "2.04";
use strict; use strict;
use Carp; use Carp;
@@ -209,9 +209,13 @@ Normally you don't call it directly.
=head1 VARIABLES =head1 VARIABLES
Variables can be defined everywhere in the config and can be used Variables can be defined everywhere in the config and can be used
afterwards. If you define a variable inside a block or a named block afterwards as the value of an option. Variables cannot be used as
then it is only visible within this block or within blocks which keys or as part of keys.
are defined inside this block. Well - let's take a look to an example:
If you define a variable inside
a block or a named block then it is only visible within this block or
within blocks which are defined inside this block. Well - let's take a
look to an example:
# sample config which uses variables # sample config which uses variables
basedir = /opt/ora basedir = /opt/ora
@@ -283,7 +287,7 @@ See L<http://www.perl.com/perl/misc/Artistic.html>
=head1 VERSION =head1 VERSION
2.02 2.04
=cut =cut

2
README
View File

@@ -104,4 +104,4 @@ AUTHOR
VERSION VERSION
2.22 2.24