Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Sort a hash of hashes by value in template toolkit

by jbert (Priest)
on Nov 16, 2007 at 12:34 UTC ( [id://651180]=note: print w/replies, xml ) Need Help??


in reply to Sort a hash of hashes by value in template toolkit

This is why I don't like additional "little languages" like template toolkit. We have a good language with if's and loops in it to hand - perl. (I'm a fan of the Text::Template approach.).

There's probably a way of doing what you want in TT, but I'd personally avoid doing that and do the sort in perl. So you could populate an array with the data sorted in the order you need, then use a simpler piece of TT to do the output.

In general, I'd advise keeping the TT as simple as possible and doing as much as possible in perl.

  • Comment on Re: Sort a hash of hashes by value in template toolkit

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://651180]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-04-19 06:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found