> When all the smoke clears, it will be relatively simple to declare an
   > ordered hash probably on the order of adding a single word to its
   > declaration.  

Yep. In fact, it's now relatively simple in Perl 5.

You just grab the Attribute::Handlers and Tie::SortHash modules and
add a single line to your program:

        use Attribute::Handlers autotie => { Sorted => 'Tie::SortHash' };

Then you can write:

        my %hash : Sorted;

or:

        my %hash : Sorted({}, sub { $hash{$b} cmp $hash{$a}});

etc.

Damian

PS: Casey, if you'd like to make that even easier for users of your 
    excellent module, send me some email.

Reply via email to