[Catalyst] using Catalyst::Model::CDBI

Alan Humphrey alan.humphrey at comcast.net
Thu Mar 31 00:32:13 CEST 2005

I must be missing something obvious.  I'm trying to follow the examples
given in the Intro document to set up my model class.  I think I've got
everything set up the way the doc shows, but it doesn't work.


package BirdWeb::Admin;

use strict;
use Catalyst qw/-Debug/;

our $VERSION = '0.01';

    name => 'BirdWeb::Admin',
    root => '/home/alanh/birdweb/trunk/BirdWeb-Admin/root',


    '!default' => sub {
        my ( $self, $c ) = @_;
        $c->res->output('Congratulations, BirdWeb::Admin is on

    'list' => sub {
		my ( $self, $c ) = @_;
		$c->stash->{item} =


BirdWeb::Admin::M::BirdWebDB :

package BirdWeb::Admin::M::BirdWebDB;

use strict;
use base 'Catalyst::Model::CDBI';

    dsn           => 'dbi:mysql',
    user          => 'xxxxx',
    password      => 'xxxxx',
    options       => {},
    relationships => 1

When I try to run the 'list' action I get this error:

Caught exception "Can't locate object method "retrieve" via package
"BirdWeb::Admin::M::BirdWebDB::Birds" (perhaps you forgot to load
"BirdWeb::Admin::M::BirdWebDB::Birds"?) at
line 22,  line 11."

What am I missing?


- Alan

More information about the Catalyst mailing list