[Catalyst] Catalyst::component()
Matt S Trout
dbix-class at trout.me.uk
Wed Oct 5 02:46:33 CEST 2005
On Wed, Oct 05, 2005 at 12:10:56AM +0200, Bernhard Graf wrote:
> On Tuesday 04 October 2005 23:54, Bernhard Graf wrote:
>
> #-)
>
> # simplified
> sub component_refactored {
> my $c = shift;
>
> return sort keys %{ $c->components } unless @_;
>
> my $name = shift;
>
> return $c->components->{$name}
> unless ref($name) eq 'Regexp';
>
> for my $component ( keys %{ $c->components } ) {
> return $c->components->{$component}
> if $component =~ /$name/;
> }
> return;
> }
If you could work the Regexp part up as a patch to the current state of
the refactored branch, I'd be much obliged.
--
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