CC: | lembark [...] wrkhors.com |
Subject: | Config-Any-0.20 does not handle ref-to-constant in Dumper format |
Date: | Thu, 11 Nov 2010 17:19:25 -0500 |
To: | bug-config-any [...] rt.cpan.org |
From: | Steven Lembark <lembark [...] wrkhors.com> |
Passing in a path to a file with:
{
bar => \'blort',
foo => \'bletch'
}
leaves me with:
DB<11> x $a = Config::Any->load_files( { files => [ $source ], use_ext => '' } )
0 ARRAY(0x8de5c40)
0 HASH(0x8de5450)
'/tmp/01-Configure-dumpfile-PB4H' => HASH(0x8de2b40)
'bar => \\\'blort\'' => undef
'foo => \\\'bletch\'' => undef
The hash keys are
'bar => \\\'blort\''
'foo => \\\'bletch\''
instead of 'bar' & 'foo'.
DB<12> x $a = qx( cat $source );
0 '{
bar => \\\'blort\',
foo => \\\'bletch\'
}
'
DB<13> x $b = eval "$a"
0 HASH(0x840e918)
'bar' => SCALAR(0x840e8e8)
-> 'blort'
'foo' => SCALAR(0x8831018)
-> 'bletch'
DB<4> x keys %$b
0 'bar'
1 'foo'
Or do I need to use file extensions to handle this properly
(i.e. the ref-to-const is confusing file type processing)?
The POD does not give any standard extension for Dumper output.
thanx
--
Steven Lembark 3646 Flora Pl
Workhorse Computing St Louis, MO 63110
lembark@wrkhors.com +1 888 359 3508