[Catalyst] difficulty in assigning an array to a stash

jagdish eashwar jagdish.eashwar at gmail.com
Sun Nov 11 16:28:04 GMT 2007

I am trying to retrieve into an array a list of values from a column
in a table using dbic and have it displayed in a drop down list in a
tt2 template. I am able to do the retrieval part, but the tt2 template
is displaying only the last value from the array. With further
experimentation, I found that if I explicitly assign an array to a
stash ( like '$c->stash->{myoptions} = [qw/1 2 3 4 5 6 7/];' ), I am
getting all the 7 values in the tt2 template drop down. But if I
define the array first and then assign it to the stash, ( like 'my
@options = qw/1 2 3 4 5 6 7/; $c->stash->{myoptions} = @options;) I am
getting only the last value in the tt2 template. How can I get all the
values in the array into the stash without having to do it explicitly?

More information about the Catalyst mailing list