Subject: | DefaultConfig fails to take array reference |
I admit I may not be using -DefaultConfig properly, but when I pass it
this hash everything operates as you would expect:
411 my $Defaults = {
412 Workflow => {
413 STEP => 'ONE',
414 THROUGH => 'TWO',
415 }
416 };
...
'DefaultConfig' => HASH(0x40d4ed24)
[snip]
'Workflow' => HASH(0x40d4dd78)
'STEP' => 'ONE'
'THROUGH' => 'TWO'
'ExtendedAccess' => 1
[snip]
However, I would like now to do "something like" this:
411 my $Defaults = {
412 Workflow => {
413 STEP => [
414 qw (ONE TWO THREE)
415 ]
416 }
417 };
I would expect this to give me something like the following. (This was
taken from a config that looks like this - note there is no use of
-DefaultConfig in this.)
12 <Workflow>
13 STEP = ONE
14 STEP = TWO
15 STEP = THREE
16 </Workflow>
...
'Workflow' => HASH(0x406ac318)
'STEP' => ARRAY(0x406ac798)
0 'ONE'
1 'TWO'
2 'THREE'
'ExtendedAccess' => 1
[snip]
But instead, when I try to use -DefaultConfig with a hash as above
(repeated here for reference), I get:
411 my $Defaults = {
412 Workflow => {
413 STEP => [
414 qw (ONE TWO THREE)
415 ]
416 }
417 };
...
main::__ANON__[./DBBS:378]('Can\'t coerce array into hash at
/dbbs212/perlmods/lib/Config...') called at /dbbs212/perlmods/l
ib/Config/General/Interpolated.pm line 177
Config::General::Interpolated::_var_array_stacker('Config::General::Interpolated=HASH(0x406abff0)',
'ARRAY(0x406abd74)', 'ST
EP') called at /dbbs212/perlmods/lib/Config/General/Interpolated.pm line 141
Config::General::Interpolated::_var_hash_stacker('Config::General::Interpolated=HASH(0x406abff0)',
'HASH(0x40d47838)') calle
d at /dbbs212/perlmods/lib/Config/General/Interpolated.pm line 146
Config::General::Interpolated::_var_hash_stacker('Config::General::Interpolated=HASH(0x406abff0)',
'HASH(0x406ac170)') calle
d at /dbbs212/perlmods/lib/Config/General/Interpolated.pm line 127
Config::General::Interpolated::_interpolate_hash('Config::General::Interpolated=HASH(0x406abff0)',
'HASH(0x406ac170)') calle
d at /dbbs212/perlmods/lib/Config/General.pm line 136
Config::General::_process('Config::General::Interpolated=HASH(0x406abff0)')
called at /dbbs212/perlmods/lib/Config/General.p
m line 115
Config::General::new('Config::General', '-ConfigFile',
'/dbbs212/config/spchp3/H10G6401.backup.config', '-ExtendedAccess', 1
, '-AutoTrue', 1, '-InterPolateVars', 1, ...) called at
/dbbs212/perlmods/lib/Local/Config.pm line 422
I have tried passing it an array instead of an array reference and have
also tried a string instead of a hash reference.
Maybe I'm not using it right?
$ perl -v
This is perl, v5.8.6 built for PA-RISC2.0-LP64
$ uname -a
HP-UX spchp1 B.11.11 U 9000/800 517750568 unlimited-user license