Subject: | Interpolation problems |
Date: | Wed, 13 Feb 2008 17:32:42 +0100 |
To: | <bug-Config-General [...] rt.cpan.org> |
From: | "Conway Allen" <Allen.Conway [...] atosorigin.com> |
Hello,
If you provide a default config definition things don't work as I would
expect them to work - perhaps it's my expectations that are wrong!
Given a config file like this:
<abc>
path /tmp
bin $path/bin
</abc>
<xyz>
path /tmp
</xyz>
and a default hash defined as
%default = (abc => {path => '/usr/local'}, xyz => {path =>
'/usr/local', bin => '$path/bin'});
The config I get back is:
{abc}{path} = /tmp
{abc}{bin} = /usr/local/bin
{xyz]{path} = /tmp
{xyz}{bin} = $path/bin
I would expect to get
{abc}{path} = /tmp
{abc}{bin} = /tmp/bin
{xyz]{path} = /tmp
{xyz}{bin} = /tmp/bin
i.e I assumed interpolation to be the last thing done once all the data
had been picked up from the config file and after having moved in the
stuff from the default hash definitions. That doesn't seem to be the
case at all !
best regards, Allen Conway