[Templates] tied hash - puzzlement

allan lambretta@inet.uni2.dk
Sun, 12 Jan 2003 19:15:03 +0100


just wondering ...
 
i have got a tied hash that i know is sorted/inserted correctly before
i send it to TT.

if using syntax 1 below TT will produce the same result as when i loop
directly in perl. 
however syntax 2 will always be sorted by the key in the hash. is this
a feature ?

TT is configfured to:
  $STASH     = 'Template::Stash';

./allan

###
syntax 1)

FOREACH ITEM = tied_hash.keys;
    ITEM;
    tied_hash.$ITEM;
END;


syntax 2)

FOREACH ITEM = tied_hash;
    ITEM.key;
    ITEM.value;
END;