[Catalyst] Models Inheriting from Catalyst::Base

Sebastian Riedel sri at oook.de
Fri Nov 18 18:49:06 CET 2005


Am 18.11.2005 um 18:09 schrieb Nigel Metheringham:

> On Thu, 2005-11-17 at 17:19 +0100, Marcus Ramberg wrote:
>
>> On 11/17/05, Nigel Metheringham  
>> <nigel.metheringham at dev.intechnology.co.uk> wrote:
>>         Are there good reasons why I should add this additional
>>         inheritance (at
>>         the potential cost of making some of the other scripts  
>> pull in
>>         chunks of
>>         Catalyst when I don't need it)?  What terrible things will
>>         happen if I
>>         don't fix this?
>>
>> You will be eaten by a grue...
>
> So I added a Catalyst::Base into the user base line of the parent  
> class
> of my models.... and was eaten by a grue :-/
>
> Its a classic DBIx::Class set of classes - base class building on
> DBIx::Class:-
>   package BroadsoftFeature::M::Db::Base::DBIC;
>   use base qw/DBIx::Class/;
>
> I changed that to
>   use base qw/Catalyst::Base DBIx::Class/;
>
> and I now get
>         Couldn't instantiate component
>         "BroadsoftFeature::M::Db::FeatureGroup", "Can't use string
>         ("BroadsoftFeature") as a HASH ref while "strict refs" in use
>         at /usr/local/share/perl/5.8.7/DBIx/Class/InflateColumn.pm  
> line
>         71." at /usr/local/share/perl/5.8.7/Module/Pluggable/Fast.pm
>         line 95
>
> Does this ring any bells for people?
>
> Using Catalyst 5.66 and DBIC 0.03 - everything up to date as of
> yesterday, although its hard to keep up with the Catalyst release
> stream :-)

There is no need to inherit from Catalyst::Base.


--
sebastian




More information about the Catalyst mailing list