> 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.
- Re: what I meant about hungarian notation John Porter
- RE: what I meant about hungarian notation David Grove
- Re: what I meant about hungarian notation Simon Cozens
- Re: what I meant about hungarian notation David L. Nicol
- Re: what I meant about hungarian notation Jarkko Hietaniemi
- Re: what I meant about hungarian notation Simon Cozens
- RE: what I meant about hungarian notation <C. Garrett Goebel>
- Re: what I meant about hungarian notation Me
- Re: what I meant about hungarian notation Larry Wall
- Re: what I meant about hungarian notation Me
- Re: what I meant about hungarian notation Damian Conway
- Re: what I meant about hungarian notation Michael G Schwern
- Re: what I meant about hungarian notation Me
- Re: what I meant about hungarian notation Graham Barr
- Re: what I meant about hungarian notation Me
- Re: what I meant about hungarian notation Graham Barr
- Re: what I meant about hungarian notation Buddha Buck
- Re: what I meant about hungarian notation Damian Conway
- Re: what I meant about hungarian notation Graham Barr
- Re: what I meant about hungarian notation John Porter
