[Catalyst] DBI search method problems

Mark Blythe list at markblythe.com
Mon Feb 27 23:51:19 CET 2006


> $c->stash->{item} = dbtest::Model::CDBI::Contest->search(id => 2);

I believe the search routine returns an array in list context or an
iterator object in scalar context.  Since you're calling it in scalar
context, you're probably getting an iterator object.  Try changing it
to:

($c->stash->{item}) = dbtest::Model::CDBI::Contest->search(id => 2);



More information about the Catalyst mailing list