Skip Menu |

This queue is for tickets about the Config-General CPAN distribution.

Report information
The Basics
Id: 39463
Status: resolved
Priority: 0/
Queue: Config-General

People
Owner: tlinden [...] cpan.org
Requestors: miah.ness [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Config::General::Interpolated variables overwritten
Date: Sat, 20 Sep 2008 16:03:25 -0400
To: bug-Config-General [...] rt.cpan.org
From: "Miah Ness" <miah.ness [...] gmail.com>
I am using Config::General version 2.4 with the InterPolateVars feature. I notice that sometimes interpolation gives unexpected results. I could be misunderstanding the interpolation features so please correct me if I am wrong. I have the follow code example: #!/usr/bin/env perl use strict; use Config::General; my $cg = new Config::General( -InterPolateVars => 1, -String => ' a=value1 <mask> a=value2 </mask> b=${a}', ); my %ch = $cg->getall(); print "Expected 'value1' got '$ch{b}'\n"; The output from the above code is: Expected 'value1' got 'value2' I would have expected that variables defined within an inner block are out of scope in the outer block. Am I misunderstanding interpolation? Thanks
I can't reproduce this. If I execute your script, I get: Expected 'value1' got 'value1' You might use an outdated version, try updating to 2.40 which fixes this bug. kind regards, Tom