in reply to Error with IniFile and Config::Ini
I checked the code and I think I see the problem. Both of the ini modules you mention use the exact same idiom that I would never use and it doesn't surprise me that a bug cropped up related to it:
which boils down to: tie %{undef}, 'Tie::IxHash'; so I'd replace it with: tie %{ $self->{sections}= {} }, 'Tie::IxHash';my $self = bless {}, $class; # Use an indexed hash to preserve the order. tie %{ $self->{sections} }, 'Tie::IxHash';
Sure, you could consider it a bug in Perl (especially since it used to work the other way), but I still consider it dangerous code to be avoided (depending on autovivification to kick in soon enough).
- tye (but my friends call me "Tye")
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(Flame) Re: (tye)Re: Error with IniFile and Config::Ini
by Flame (Deacon) on Jan 15, 2002 at 00:54 UTC |