mirror of
https://codeberg.org/scip/Config-General.git
synced 2025-12-16 20:21:01 +01:00
2.15 - fixed Bug in SaveConfig***, which didn't work.
- applied patch by Robb Canfield <robb@canfield.com>, which fixes a bug in the variable interpolation scheme. It did not interpolate blocks nor blocknames. This patch fixes this. Patch slightly modified by me(interpolation on block and blocknames). - enhanced test for variable interpolation to reflect this. - added check if a named block occurs after the underlying block is already an array, which is not possible. perl cannot add a hashref to an array. i.e.: <bl> a = 1 </bl> <bl> b = 1 </bl> <bl blubber> c = 1 </bl> As you can see, "<bl>" will be an array, and "blubber" cannot be stored in any way on this array. The module croaks now if such construct occurs. git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@41 be1acefe-a474-0410-9a34-9b3221f2030f
This commit is contained in:
@@ -125,8 +125,6 @@ sub _var_hash_stacker {
|
||||
#
|
||||
my ($this, $config) = @_;
|
||||
|
||||
|
||||
|
||||
foreach my $key (keys %{$config}) {
|
||||
if (ref($config->{$key}) eq "ARRAY" ) {
|
||||
$this->{level}++;
|
||||
@@ -148,7 +146,6 @@ sub _var_hash_stacker {
|
||||
}
|
||||
}
|
||||
|
||||
#$this->{level}--;
|
||||
return $config;
|
||||
}
|
||||
|
||||
@@ -160,7 +157,6 @@ sub _var_array_stacker {
|
||||
my ($this, $config, $key) = @_;
|
||||
|
||||
my @new;
|
||||
#$this->{level}++;
|
||||
|
||||
foreach my $entry (@{$config}) {
|
||||
if (ref($entry) eq "HASH") {
|
||||
|
||||
Reference in New Issue
Block a user