[Catalyst] putting an object in the stash

Bogdan Lucaciu bogdan at wiz.ro
Tue Mar 13 14:27:56 GMT 2007


On Tuesday 13 March 2007 15:06, Octavian Rasnita wrote:
> > my $model = $c->model("Database::Table");
> > foreach my $column (@{$model->columns}) {
> >    $column =~ s{me\.}{}; # strip the prefix DBIC adds
> >    $c->stash->{$column} = $obj->$column;
> > }
>
> I have tried that, but it gave the following error:
>
> Can't locate object method "columns" via package "DBIx::Class::ResultSet
>
> What am I doing wrong?


it's $resultset->result_source->columns

-- 
Bogdan Lucaciu
http://www.wiz.ro



More information about the Catalyst mailing list