Subject: | Fix for #27225 breaks setting defaults for non-toplevel variables |
The fix for bug #27225 breaks setting default values for non-toplevel
variables - the stack is apparently cleared from defaults as well. This
breaks the W3C Markup Validator.
The attached patch contains a quick patch for the test suite which
causes it to fail with 2.36 but it works as expected with 2.33.
Subject: | t.patch |
diff -up t/cfg.17~ t/cfg.17
--- t/cfg.17~ 2007-10-17 09:49:29.000000000 +0300
+++ t/cfg.17 2007-10-17 20:30:23.000000000 +0300
@@ -1 +1,4 @@
home = /home/users
+<foo>
+quux = $bar
+</foo>
diff -up t/run.t~ t/run.t
--- t/run.t~ 2007-10-17 09:49:29.000000000 +0300
+++ t/run.t 2007-10-17 20:31:10.000000000 +0300
@@ -121,12 +121,16 @@ else {
# testing value pre-setting using a hash
my $conf17 = new Config::General(
-file => "t/cfg.17",
- -DefaultConfig => { home => "/exports/home", logs => "/var/backlog" },
+ -DefaultConfig => { home => "/exports/home", logs => "/var/backlog",
+ foo => { bar => "quux" }},
+ -InterPolateVars => 1,
-MergeDuplicateOptions => 1,
-MergeDuplicateBlocks => 1
);
my %h17 = $conf17->getall();
-ok ($h17{home} eq "/home/users", "Testing value pre-setting using a hash");
+ok ($h17{home} eq "/home/users" &&
+ $h17{foo}{quux} eq "quux",
+ "Testing value pre-setting using a hash");
### 18