Skeeve has asked for the wisdom of the Perl Monks concerning the following question:
I already mailed the author but maybe someone here also know the answer?
If I have identical blocks in a Config::General configuration file like the one in my example below. What will be the sequence in which my script receives them? Will it be document order? From my test it seems to be the case, but I couldn't find anything about the order in the documentation.
here is my example code:
On my system the result isuse strict; use warnings; use Data::Dumper; use Config::General; my $conf = new Config::General( -String => <<'CONFIG' ); <option> value 1 </option> <option> value 2 </option> CONFIG print Dumper( { $conf->getall() } ); exit;
Which is the document order I expected. But can I be sure that it will always be the case? Even in the next release of Config::General?$VAR1 = { 'option' => [ { 'value' => '1' }, { 'value' => '2' } ] };
s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
+.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Config::General identical blocks sequence
by Anonymous Monk on Aug 01, 2011 at 07:50 UTC | |
by jethro (Monsignor) on Aug 01, 2011 at 08:58 UTC | |
Re: Config::General identical blocks sequence
by Mr. Muskrat (Canon) on Aug 02, 2011 at 19:34 UTC | |
Re: Config::General identical blocks sequence
by ikegami (Patriarch) on Aug 02, 2011 at 19:44 UTC | |
Re: Config::General identical blocks sequence
by Skeeve (Parson) on Aug 03, 2011 at 17:40 UTC |
Back to
Seekers of Perl Wisdom