Skip Menu |

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

Report information
The Basics
Id: 32726
Status: resolved
Priority: 0/
Queue: Config-Any

People
Owner: Nobody in particular
Requestors: DAMS [...] cpan.org
Cc:
AdminCc:

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



Subject: Config::Any::Ini sections with normal key/values and subsections is broken
Hi, Consider : [section1] some = option [section1 subsection1] some = option [section1 subsection2] some = option If you are unlucky (i.e. always, following Murphy's Law), the loop on the hash keys of the $config object will be done in this order : 'section1 subsection1', 'section1', 'section1 subsection2'. This will give this structure : section1 => { some = option, subsection2 => { some => option } } Where is subsection1 ? it has been erased by this line : $out->{ $k } = $ref; Here is the patch to fix it : --- INI.pm.old 2008-01-28 14:00:05.000000000 +0700 +++ INI.pm 2008-01-28 13:59:42.000000000 +0700 @@ -59,7 +59,7 @@ $out->{ $a }->{ $b } = $ref; } else { - $out->{ $k } = $ref; + $out->{ $k } = { %{$out->{ $k }}, %$ref }; } } return $out; Cheers, dams
Thanks for the bug report. Version 0.11 should hit CPAN soon. -Brian