[Catalyst] info basic stash problem...maybe i am too tired this
sunday
Ash Berlin
ash_cpan at firemirror.com
Sun Jan 14 19:01:29 GMT 2007
Igor Longagnani wrote:
> Hi, newbie here...
> i thought i had understood stash behaviour... but prolly not :)
>
> I can use it together with DBIx::Class resultsets and so on, BUT now i
> would like to put such an hashref
>
> $chiavi= {
> 'ka-111-234-586' => '0',
> 'ka-90-85-349' => '0',
> 'ka-5-21-629' => '0',
> 'ka-1-406-194' => '0',
> 'ka-111-194-479' => '1',
> 'ka-1-451-540' => '0',
> 'ka-1-254-610' => '0',
> 'ka-1-216-571' => '0',
> ... more data...
> };
>
> into the stash e.g. $c->stash->{allegati} = $chiavi;
> then i would like to use something like
>
> <! -- standard cycle through some kind of data -->
> [ FOREACH ... %]
> ...
> <!-- build one of the key of the hashref 'allegati' -->
> [% currentkey = ...%]
>
> <!-- use one of the values of the hashref -->
> [% allegati.currentkey %]
>
>
> The problem is this last [% allegati.currentkey %] is always empty even
> if i am sure i am asking for an existing key of the hash ref.
> What am i doing wrong?
> I know it is something silly ... but still makes me doubt about my
> comprehension of the stash
>
> Any wise suggestion?
Yes - show us the code for the action and the full template - the info
you've given isn't enough do divine the problem.
Ash
More information about the Catalyst
mailing list