in reply to Preserving order for nested hashes using Tie::IxHash

The solution that I use is to write a function that returns a hash reference that is tied. Like this:
use Tie::IxHash sub ordered_hash_ref { tie my %hash, 'Tie::IxHash', @_; return \%hash; } # time passes... tie my %data, 'Tie::IxHash', 1 => ordered_hash_ref( 6 => ordered_hash_ref( width => 53, len => 16, width_arr => [ 53 ], mems => 1, rows => 1 mux => 4, len_arr => [ 16 ], cols => 1, ), ), ;
This is nice if you like having your nested data structures declared compactly, albeit at the cost of having to put the function calls in there.