[Dbix-class] Schema and Loader

Jason Kohles email at jasonkohles.com
Fri Jan 6 00:55:58 CET 2006


On 1/5/06, Matt S Trout <dbix-class at trout.me.uk> wrote:
> On Thu, Jan 05, 2006 at 03:05:52PM -0500, Jason Kohles wrote:
>
> > # and restart the C3 MRO calculations, just in case any of the code we
> > # just loaded messed with inheritance
> > Class::C3::reinitialize();
>
> Probably not a bad idea, but provided you stick to the ->load_components
> idiom for adding stuff it's unlikely to cause a problem; Componentised.pm
> automatically reinitialize()s when necessary most of the time (this may be
> deleterious to your startup times but using an ORM is anyway so I'm not
> worrying about that until somebody shows me a bench :)
>

I can't remember now what module I was loading that prompted me to add
the reintilialize there, but as I recall the problem I ran into was
where I had a MyApp::Table module which contained 'use ProblemModule;'
and ProblemModule called 'use base' to set up it's inheritance.  This
may not be necessary anymore (it might not have actually been
necessary to begin with, I didn't dig into it very deeply), but since
I'm only loading this once when mod_perl starts up, I haven't worried
about it...

--
Jason Kohles
email at jasonkohles.com - http://www.jasonkohles.com/
"A witty saying proves nothing."  -- Voltaire



More information about the Dbix-class mailing list