[Dbix-class] Resultset classes and auto-loading

Matt S Trout dbix-class at trout.me.uk
Tue May 8 12:44:29 GMT 2007


On Thu, Apr 19, 2007 at 12:35:40PM -0400, Christopher H. Laco wrote:
> Christopher H. Laco wrote:
> > Kaare Rasmussen wrote:
> >>> Well, there's your problem. You're trying to use Handel. :-)
> >> That's one thing, but not the problem at hand :-)
> >>
> >> It seems that DBIC changed behavior rather significantly between _01 and _02 
> >> if the former autoloads RS classes and the latter doesn't.
> >>
> > 
> > The answer is out there... somewhere...
> > 
> > http://search.cpan.org/diff?from=DBIx-Class-0.07999_01&to=DBIx-Class-0.07999_02
> 
> Still digging... probably something to do with the fact that
> AccessorGroup went away u in _02... and it had
> get_component_class/set_component_class which loaded the class...
> 
> Now that that is gone, I'd bet we're just missing a 'use' somewhere when
> we set those class names for resultsets...
> 
> Speaking of which: mst: any reason not to add a get_set_component class
> to Class::Accessor::Grouped? I use it all the time myself in
> handel/mango, so it seems like it would be usefully in CAG...

None at all. Please do so and switch -current across, I'd forgotten that
the old AccessorGroup code did this since I didn't make the change and have
always use'd my resultset classes directly myself.

If this is important to you guys, please can somebody write a test for it
- if that had been done in the first place the regression wouldn't have
happened when I did the conversion.

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director    Want a managed development or deployment platform?
Shadowcat Systems Ltd.   Contact mst (at) shadowcatsystems.co.uk for a quote
                                          http://www.shadowcatsystems.co.uk/ 



More information about the Dbix-class mailing list