[Templates] Getting keys from a hash

Simon Wistow simon at thegestalt.org
Tue Feb 26 10:59:22 GMT 2008


On Tue, Feb 26, 2008 at 10:47:15AM +0000, Karl Dane said:
> Apparently not! Still gives me nothing...
> 
> It's like the keys vmethod is being completely ignored.

Hmm, weird.

On my machine

% cat foo.tt
[%- cgihash = { 'a' => 1, 'b' => 2, 'c' => 3 } -%]
[% cgihash.keys.join("\n") %]
% tpage foo.tt
c
a
b
%




More information about the templates mailing list