[Catalyst] what's the point of Catalyst::Model::CDBI::Plain?

Matt S Trout catalyst at trout.me.uk
Fri Aug 5 21:24:39 CEST 2005


On Fri, Aug 05, 2005 at 09:39:27AM +0200, Marcus Ramberg wrote:
> On 8/3/05, Phil Mitchell <seasprocket at gmail.com> wrote:
> > Right now, in my app, my model classes simply extend Class::DBI and it
> > all works fine. By using CDBI::Plain, my models would get
> > Catalyst::Base and a new() method ... what i don't understand is why
> > they would want that?
> 
> Using the ::Plain base class means that all your model classes will be
> loaded automatically at  startup of your application. Catalyst
> initializes all Classes that inherit from Catalyst::Base in the
> MyApp::[[M|V|C]] namespaces. That's all,  I guess.

It's a hangover from the Loader-using code, which instantiates all the
packages. Would people be interested in a patch to Plain which searched
for all classes underneath the M:: class and used M::P to load them?

-- 
     Matt S Trout           Website: http://www.shadowcatsystems.co.uk
  Technical Director        E-mail:  mst (at) shadowcatsystems.co.uk
Shadowcat Systems Ltd.



More information about the Catalyst mailing list