[Dbix-class] Re: Resultset classes and auto-loading

Brandon Black blblack at gmail.com
Thu May 10 16:45:52 GMT 2007

On 5/10/07, Christopher H. Laco <claco at chrislaco.com> wrote:
> Brandon Black wrote:
> > On 5/10/07, Brandon Black <blblack at gmail.com> wrote:
> >> On 5/10/07, Christopher H. Laco <claco at chrislaco.com> wrote:
> >> >
> >> > Given that I understood about 1% of that... :-)
> >> > Would using 'calculateMRO' in a CAG::C3->get_super_paths($class) for
> >> now
> >> > still be more correct at this point?
> >> >
> >>
> >> Yes, so long as you detect that $class is using C3 and only do it in
> >> those cases.  mro::get_linear_isa($class) will do the same basic thing
> >> as calculateMRO, but it automatically knows about C3 vs "normal", and
> >> gives the right answer for both.  (once it exists for your perl).
> >>
> >
> > I guess I'm failing to mention that everything I'm saying is
> > predicated on the idea of making CAG C3-compatible, rather than adding
> > a new package CAG::C3
> >
> >
> And I'm assuming to make a CAG::C3.. and use that inside of DBIC rather
> than just using CAG....
> So, when is mro::get_linear_isa($class) available...

Real Soon Now :)  I'm in a time crunch at $work right now, but it's
not a hard module to write.  Perhaps this weekend.

> And do I need to know if a $class is or isn't C3ed, if we're talking
> about all accessors inside of the DBIC core code...

You don't, you can assume, I think.  I think it would be even better
to wait for mro.pm and do it as a patch to the existing CAG though.
CAG::C3 looking at Class::C3 stuff won't work for people doing C3
without Class::C3 on perl 5.9.5+, whereas the mro.pm approach will,
since it's a backport of those 5.9.5+ interfaces.

-- Brandon

More information about the Dbix-class mailing list