in reply to Re: Permanently sort a hash
in thread Permanently sort a hash

kennethk,
Actually, that FAQ is wrong.

Although this does keep your hash sorted, you might not like the slow down you suffer from the tie interface.

What Tie::IxHash actually does is preserve your insertion order. It does have rudimentary capability to re-order by asciibetical sorted keys or values but it is not persistent. If you add key/val pairs, they don't insert into their sorted position and you have to re-order them again. You also can't do anything more complex when sorting.

Tie::Hash::Sorted OTOH does answer the FAQ but I feel a bit odd sending a doc patch to p5p pimping my own module.

Cheers - L~R