[Templates] Re: Array to hash with 1 result

Sergey Martynoff sergey@martynoff.info
Sat, 7 Jul 2007 17:33:47 +0400


> my template does the following
> 
> [% FOREACH thing IN object.list_things() %]
>    The name of the thing is [% thing.name %]
> [% END %]
> 
> If the function returns
> 
> return [ { name => 'test' } ];
> 
> I get not output and dumping the result of the function yields $VAR1  
> = { name => 'test' } instead of the expected $VAR1 = [ { name =>  
> 'test' } ]

You are probably using an older version of Template Tookit. I recall that
there was such a problem formerly, but I cannot repeat this bug on TT 2.18.


-- 
Sergey Martynoff