[Catalyst] Problem with Catalyst::Engine::component()

Bernhard Graf catalyst at augensalat.de
Sun Aug 28 19:14:50 CEST 2005


Marcus Ramberg wrote:

> > Well, you could have used $c->component('^MyApp::M::Shop$'), but i
> > agree, regex search is wrong, anyone got objections against
> > removing it? It was originally meant to save me some typing, but it
> > seems there are too many people who can't handle it.
>
> I object! ;) I've just used this feature in
> Catalyst::Plugin::DefaultEnd, to find the first available View
> component.

Aren't you serious about this or why is the smiley?
Did you release this mod already or is there a chance for modification?

Besides Catalyst::Engine::component() needs two fixes: Add defined() to 
the first if stmt to cope with objects that might evaluate to false in 
boolean context like Class::DBI based objects might do and of course 
return nothing if nothing matches.

BTW Marcus: When will "tomorrow afternoon" happen? ;) (just wanted to 
know how Mojomojo is evolving)
-- 
Bernhard Graf



More information about the Catalyst mailing list