[Catalyst] CatalystX::CRUD Storage Error

Amiri Barksdale amiribarksdale at gmail.com
Fri Jul 17 03:48:04 GMT 2009

On Thu, Jul 16, 2009 at 09:36:47PM -0500, Peter Karman wrote:
| what does your Controller config look like? Specifically, what is the value of
| 'model_name' and what does the model_name class look like? The model_name value
| should be the same for all your Controllers (the main subclass of
| Catalyst::Model::DBIC::Schema in your Model directory).


I changed all my CRUD controllers to look like this:

   package ml2::Controller::UI::CRUD::Band;

   use strict;
   use warnings;

   use base qw/CatalystX::CRUD::Controller/;

       'model_adapter' => 'ml2::ModelAdapter::UI::CRUD::Adapter',
       'model_name' => 'DB', ### Did not work with 'ml2::Model::DB'


And now I get an error:

   Couldn't instantiate component "ml2::Controller::UI::CRUD::Band", "Can't
   use an undefined value as a HASH reference at
   /home/amiri/mlrepo/lib/perl5/CatalystX/CRUD/ModelAdapter/DBIC.pm line
   179."Compilation failed in require at ./script/ml2_server.pl line 66.

So, I am thinking my adapter may be misconfigured. My adapter is:

   package ml2::ModelAdapter::UI::CRUD::Adapter;

   use strict;
   use warnings;
   use base qw/CatalystX::CRUD::ModelAdapter::DBIC/;


A mere subclass of the DBIC model adapter. Is this insufficient?


More information about the Catalyst mailing list