Subject: | interpolation issues with blocks |
Using the following config file:
param1 = This is parameter 1
foo = bar
<block1>
foo = bored
param1 = Something different
bar = baz
</block1>
<block2>
thisfoo = $foo
param2 = $param1
</block2>
with these Config::General options:
Config::General->new(-ConfigFile => $config_file,
-IncludeRelative => 1,
-AutoTrue => 1,
-LowerCaseNames => 1,
-InterPolateEnv => 1,
-InterPolateVars => 1,
-MergeDuplicateBlocks => 1,
-MergeDuplicateOptions => 1,
-UseApacheInclude => 1,
);
In Config::General versions prior to 2.37, I get this:
$VAR1 = {
'block1' => {
'bar' => 'baz',
'foo' => 'bored',
'param1' => 'Something different'
},
'block2' => {
'thisfoo' => 'bar',
'param2' => 'This is parameter 1'
},
'foo' => 'bar',
'param1' => 'This is parameter 1'
};
However with Config::General 2.37 and 2.38, I now get this:
$VAR1 = {
'block1' => {
'bar' => 'baz',
'foo' => 'bored',
'param1' => 'Something different'
},
'block2' => {
'thisfoo' => 'bored',
'param2' => 'Something different'
},
'foo' => 'bar',
'param1' => 'This is parameter 1'
};
The value of "thisfoo" inside block2 has now taken the value of "foo"
that was defined in block1. If I understand the docs correctly,
shouldn't the redefined value for "foo" remain local to block1 only so
that block2 takes the top-level value of "foo"?
Maybe this is related to the changes for bug 30063?
Let me know if you need more info. Thanks!