[Petal] repeat through hash
Jonathan Vanasco
petal-list at 2xlp.com
Thu Apr 20 22:05:56 BST 2006
On Apr 19, 2006, at 9:34 PM, Peter Rabbitson wrote:
> What you probably need is the each: function provided by Petal::Utils.
just be wary that its not strict tal - so you won't be able to use
your Petal templates with python or php
generally, what i do is this:
pull everything from the db into a hash using named keys , and a
_HASHNAME_order array that has the order of the keys if necessary
do what i must with the data
for output, just create a new array, and loop through the order of
hash keys tossing a ref to the element into the item
petal is great in that it'll dereference most refs automagically so
there's almost no performance hit in 90% of what you need to do
More information about the Petal
mailing list