in reply to HoHoH Insertion Order
The module will have strictures and warnings for the fun of it, and documentation, and a version number, of course.package Tie::IxHash::Easy; use Tie::IxHash; @ISA = 'Tie::IxHash'; sub STORE { my ($self, $key, $value) = @_; tie %$value, 'Tie::IxHash::Easy' if ref($value) eq "HASH"; $self->SUPER::STORE($key, $value); } 1;
To use it, just use Tie::IxHash::Easy instead of Tie::IxHash in your code. You only need to tie the outermost hash. Hashes created inside the tied hash will be auto-tied by Tie::IxHash::Easy::STORE.
|
|---|