[Catalyst] assigning vars to $c->stash

Octavian Rasnita orasnita at gmail.com
Mon Mar 12 11:31:51 GMT 2007


Hi,

I have a $hash hash reference and I want to add all its elements to the 
stash. How can I do this? Do I need to use a loop and assign each element 
one by one?

I have seen that it is not possible to use $c->stash = $hash;

Can I use something else than

foreach(keys %$hash) {
$c->stash->{$_} = $hash->{$_};
}

Thank you.

Octavian




More information about the Catalyst mailing list