[Catalyst] pass array to template?

John Wang johncwang at gmail.com
Wed Jun 28 21:48:58 CEST 2006


On 6/28/06, Sarah Berry <berry.sarah at gmail.com> wrote:
>
> How can I pass an array to Template Toolkit, then loop through it? I'm
> trying to pass it through the stash just like anything else, as
> follows:
> [...]
>         $c->stash->{numarray} = @numtextCaps;


Use an arrayref:

$c->stash->{numarray} = \@numtextCaps;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20060628/0bcf30e7/attachment.htm 


More information about the Catalyst mailing list