[Petal] repeat through hash

Corey corey_s at qwest.net
Thu Apr 20 01:52:00 BST 2006


Is there any particular technical reason why the 'repeat' syntax can't/won't 
loop through hashes, as though passed to, say, the perl 'keys' or 'values' 
function, or something similar to 'for ( %{ $hash } ) { return $_ }'?

It seems rather limiting to only be able to iterate/loop through arrays or
arrays of hashes - I'm constantly finding that I have to design my libraries' 
data-structures around Petal; for instance, using arrays of hashes 
rather than plain hashes which are often more natural and appropriate.

Thanks,

Corey



More information about the Petal mailing list