[Catalyst] Catalyst::Manual::Cookbook and/or Catalyst::Model::CDBI::CRUD issue

samwyse samwyse at gmail.com
Mon Jun 13 05:02:45 CEST 2005


"Scaffolding is very simple with Catalyst. Just use
Catalyst::Model::CDBI::CRUD as your base class."

OK, I followed the example and got this:  <<Caught exception "Can't
locate object method "columns" via package
"MyApp::Model::MyCDBI::User" (perhaps you forgot to load
"MyApp::Model::MyCDBI::User"?) at
/home/dentos/MyApp/script/../lib/MyApp.pm line 105.">>

Here's that file (sans comments):

package MyApp::M::MyCDBI::User;
use strict;
1;

And here's its parent:

package MyApp::M::MyCDBI;
use strict;
use base 'Catalyst::Model::CDBI::CRUD';
__PACKAGE__->config(
    dsn           => 'dbi:SQLite:/tmp/MyApp.db',
    user          => '',
    password      => '',
    options       => {},
    relationships => 1
);
1;

This seems in accordance with the cookbook examples, so I'm unsure
what the problem is.  I've spent a fair amount of the weekend reading
various packages that may or may not be connected, without much
progress (although I guess I haven't tried following the ISA chain of
my class to verify its ancestory).

One possibility:  I'm using SQLite3.  The installation of CRUD failed
its tests due to problems finding SQLite2, but a 'force install' seems
to have worked.



More information about the Catalyst mailing list