[Catalyst] Models Inheriting from Catalyst::Base
Matt S Trout
dbix-class at trout.me.uk
Sat Nov 19 02:41:53 CET 2005
On Fri, Nov 18, 2005 at 05:09:54PM +0000, Nigel Metheringham wrote:
> 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/;
There's no real advantage to making your table classes isa Catalyst::Base
- generally you'd want to have either your Loader-using class or your
DBIx::Class::Schema (which is how the Plain model works) isa Catalyst::Base
so you can use 'sub new' to get application config for init etc.
> 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 :-)
I doubt it's relevant here, but please bear in mind DBIx::Class uses a
0.XXyyy versioning scheme - XX represents substantive changes and yyy
point releases; latest 0.03 point release is 0.03003, which I'd recommend
installing for the POD improvements by Marcus and others alone.
It's like the new Class::DBI versioning system, except CPAN still works :-)
--
Matt S Trout Specialists in Perl consulting, web development, and
Technical Director UNIX/Linux systems architecture and automation. Mail
Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more information
+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +
More information about the Catalyst
mailing list