[Catalyst] order_by not sorting

Len Jaffe lenjaffe at jaffesystems.com
Sat Sep 2 19:38:29 CEST 2006


On 9/2/06, Lars Balker Rasmussen <lars at balker.dk> wrote:
>
> On Sat, Sep 02, 2006 at 10:36:50AM -0400, J Cook wrote:
> > The sort field is an integer type. Why isn't this ordering it?
> Because you're mapping the nice sorted list into a hash.


Hashes don't maintain sort order.  That's why you see
 map { do something} sort keys %mylittlehash

and

foreach (sort keys %$myhashref ) { do_domething}

as often as not.

Len.


-- 
lenjaffe at jaffesystems.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20060902/104d4e64/attachment.htm 


More information about the Catalyst mailing list