[Catalyst] Catalyst::component()

Matt S Trout dbix-class at trout.me.uk
Tue Oct 4 17:13:36 CEST 2005


On Tue, Oct 04, 2005 at 10:24:09AM +0200, Sebastian Riedel wrote:
> 
> Am 04.10.2005 um 09:00 schrieb Bernhard Graf:
> 
> >it would be very nice if this method gets fixed for the 5.50 release.
> >
> >See http://lists.rawmode.org/pipermail/catalyst/2005-August/ 
> >001464.html
> >and
> >http://lists.rawmode.org/pipermail/catalyst/2005-September/001728.html
> 
> Yes, i'd like that too, but we are very careful with compatibility  
> breaking changes (as you may have noticed).
> 
> Are there more people interested in this change, and how should $c- 
> >component() exactly work?

I'm very much interested in this change; I thought we were going for -

MyApp->comp($name)

looks for (in order)

$name
MyApp::$name
MyApp::[MVC]::$name

and change the check from a straight if to an exists check, which will sort
the CDBI issue, then do a regex search if it falls off that search order.

Plus MyApp->comp(qr/.../) is an explicit regex search.

http://lists.rawmode.org/pipermail/catalyst/2005-August/001478.html
http://lists.rawmode.org/pipermail/catalyst/2005-August/001486.html

Last comment on this was sri - "Yes, thats a very clean solution, i like it."
(in http://lists.rawmode.org/pipermail/catalyst/2005-August/001488.html)

That should pretty much maintain backwards compat but still provide a
much-improved facility from this method - if nobody has any objections I'd
be happy to implement this against refactored.

-- 
     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