[Catalyst] problem with DBIx, Catalyst and PostgreSQL

Luca Ferrari fluca1978 at infinito.it
Thu Jan 29 10:25:28 GMT 2015

Oh what a shame!
Apologize for the noise, the model was 'Smickets::Worker' and not
I found out dumping the $c->model( 'Smickets' ) hash....

Sorry for the noise.


On Thu, Jan 29, 2015 at 11:20 AM, Luca Ferrari <fluca1978 at infinito.it> wrote:
> Hi all,
> I'm working on an application and I've a problem I cannot resolve.
> I've a postgresql database with a workers table, loggin of queries is on.
> I've created the schema with:
> % perl script/smickets_create.pl model SmicketsDB DBIC::Schema
> Smickets::Schema create=static dbi:Pg:dbname=smicketsdb username
> password
> and I've got the Result for the table Workers in
> lib/Smickers/Schema/Result/Workers.pm.
> So everything seems fine to me, but when in my controller I try to do:
> my $workers = $c->model( 'SmicketsDB::Workers' )->all();
> I got the following error:
> Caught exception in Smickets::Controller::Workers->list "Can't call
> method "all" on an undefined value at
> /mnt/ada1a/sviluppo/Perl/Smickets/script/../lib/Smickets/Controller/Workers.pm
> line 35."
> I've checked that the database connection info is ok, and that the
> table contains some data. Moreover, I cannot see any query running
> against the database.
> What am I missing?
> Thanks,
> Luca

More information about the Catalyst mailing list