[Catalyst] Major (for me) problem fixed! [patch]

Matt S Trout dbix-class at trout.me.uk
Mon Jul 31 15:53:01 CEST 2006


Nathan Kurz wrote:
> ps. I've also found that MPO isn't the prettiest code, and it
>     scares me a bit that Catalyst is built on top of it.

No, it isn't. But it's code that has been used in production a lot of places 
for a long time, and M::P::Fast is just as ugly (due to being mostly a 
fast-hack fork of an old M::P version).

Module::Pluggable also has a test suite and a responsive maintainer; neither 
can be said of M::P::F.

> ---------------------------------------------------------------------
> --- Catalyst.pm~        2006-07-19 15:48:15.000000000 -0600
> +++ Catalyst.pm 2006-07-28 13:54:32.000000000 -0600
> @@ -1790,6 +1790,7 @@
>          
>      my $locator = Module::Pluggable::Object->new(
>          search_path => [ map { s/^(?=::)/$class/; $_; } @paths ],
> +        only => qr/(^|::)\w+$/,
>          %$config
>      );

Note the '%$config' there. In MyApp,

http://search.cpan.org/~mramberg/Catalyst-Runtime-5.7001/lib/Catalyst.pm#%24c-%3Esetup_components

__PACKAGE__->config({
   setup_components => { only => qr/(^|::)\w+$/ }
});

will fix this without requiring a patch to anything.



More information about the Catalyst mailing list