[Catalyst] info basic stash problem...maybe i am too tired this sunday

Igor Longagnani i.longagnani at synervis.it
Sun Jan 14 18:30:06 GMT 2007


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?
Igor




More information about the Catalyst mailing list