[Catalyst] Sort something in the stash
Ryan
god at detz.net
Wed Jun 7 15:04:10 CEST 2006
This probably already exists in perl but it's something I've come upon a
few times and I was seeing if there was a way to do it.
I use Template to view the pages so for data I store it in a array of
hashes so I can loop and grab the data.
$c->stash->{results}->[0]->{id} = 1;
$c->stash->{results}->[0]->{name} = 'test';
Something like that...and I want to be able to sort on say 'name' in that
structure. Anyone know an easy way to sort by an array of hashes on a key?
More information about the Catalyst
mailing list