[Catalyst] Catalyst::component()

Matt S Trout dbix-class at trout.me.uk
Wed Oct 5 02:50:41 CEST 2005


On Tue, Oct 04, 2005 at 11:54:27PM +0200, Bernhard Graf wrote:
> On Tuesday 04 October 2005 18:35, you wrote:
> > On Tue, Oct 04, 2005 at 06:00:33PM +0200, Bernhard Graf wrote:
> > > It is worse if you read my mail
> > > http://lists.rawmode.org/pipermail/catalyst/2005-August/001464.html
> >
> > To which I replied with a suggest set of changes, and a request for
> > comments.
> >
> > I'm still waiting for you to comment. Maybe you could reply to my
> > re-post of the proposal today?
> 
> At least I'd like the bugs fixed:
> - have a defined() for $c->components->{$name}

What I've committed uses exists. Can anyone see an argument for changing this?

> - don't return a number but undef (nothing) in scalar context if no
>   component matched $name

I think this would be beneficial, in fact it should probably return undef
outright and only return the list when it's been given an argument.

What do people think? Is anybody relying on the current behaviour in code?

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