mirror of
https://codeberg.org/scip/Config-General.git
synced 2025-12-16 20:21:01 +01:00
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). git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@50 be1acefe-a474-0410-9a34-9b3221f2030f
This commit is contained in:
15
Changelog
15
Changelog
@@ -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
|
||||
- still versioning problem, stupid white man ;-)
|
||||
Extended.pm is now 2.00 which *is* higher than 1.10.
|
||||
@@ -20,7 +33,7 @@
|
||||
sets $/ if it is unset.
|
||||
|
||||
- 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
|
||||
informations on this issue.
|
||||
|
||||
|
||||
10
General.pm
10
General.pm
@@ -18,7 +18,7 @@ use strict;
|
||||
use Carp;
|
||||
use Exporter;
|
||||
|
||||
$Config::General::VERSION = "2.23";
|
||||
$Config::General::VERSION = "2.24";
|
||||
|
||||
use vars qw(@ISA @EXPORT);
|
||||
@ISA = qw(Exporter);
|
||||
@@ -170,7 +170,7 @@ sub new {
|
||||
}
|
||||
else {
|
||||
# this happens if $#param == -1,1 thus no param was given to new!
|
||||
$self->{config} = $this->_hashref();
|
||||
$self->{config} = $self->_hashref();
|
||||
$self->{parsed} = 1;
|
||||
}
|
||||
|
||||
@@ -611,6 +611,10 @@ sub _parse {
|
||||
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
|
||||
$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 ($this->{MergeDuplicateBlocks}) {
|
||||
# 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
|
||||
|
||||
2.23
|
||||
2.24
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package Config::General::Interpolated;
|
||||
$Config::General::Interpolated::VERSION = "2.03";
|
||||
$Config::General::Interpolated::VERSION = "2.04";
|
||||
|
||||
use strict;
|
||||
use Carp;
|
||||
@@ -209,9 +209,13 @@ Normally you don't call it directly.
|
||||
=head1 VARIABLES
|
||||
|
||||
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
|
||||
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:
|
||||
afterwards as the value of an option. Variables cannot be used as
|
||||
keys or as part of keys.
|
||||
|
||||
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
|
||||
basedir = /opt/ora
|
||||
@@ -283,7 +287,7 @@ See L<http://www.perl.com/perl/misc/Artistic.html>
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
2.02
|
||||
2.04
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
Reference in New Issue
Block a user