[Catalyst] Users of search_extra feature - I need to hear from you.

Rodrigo rodrigolive at gmail.com
Mon Jul 18 16:26:25 GMT 2011


On Mon, Jul 18, 2011 at 3:54 PM, Tomas Doran <bobtfish at bobtfish.net> wrote:

> Hi
>
> Is anyone actually using the 'search_extra' feature (as documented here:
> http://search.cpan.org/~**bobtfish/Catalyst-Runtime-5.**
> 80032/lib/Catalyst.pm#$c-%**3Elocate_components%28_$setup_**
> component_config_%29<http://search.cpan.org/~bobtfish/Catalyst-Runtime-5.=
80032/lib/Catalyst.pm#$c-%3Elocate_components%28_$setup_component_config_%2=
9>
> )
>
> I don't see how it's useful to anyone in its current form, and some of the
> refactoring work being done in a branch is being made much harder due to
> it's existence.
>
> If you're using this feature in a real application, please shout at me!!
>
>
We're using 1) search_extra =3D> [ 'MyAppX' ], as an add-on, non core
namespace 2) {setup_components}->{except} 3) an around 'locate_components'
to filter components in a special mode (which is used under a special flag
which is not being really as far as I remember).

if( $ENV{YELLOW_VERSION} ) {
   around 'locate_components' =3D> sub {
        my $orig =3D shift;
        grep !/Blue/, $orig->( @_ );
   };
}


Just like Stephen, I'd say that the 'except' part could be thrown into the
locate_components wrap, which is already doing filtering. But I'm not sure
about search_extra... that could mean running Module::Pluggable again on the
same directories already scanned by the first Catalyst instance (but now
looking for 'MyAppX' packages), unless we could hook into Catalyst's own
Module::Pluggable somehow.

-rodrigo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20110718/3979a=
893/attachment.htm


More information about the Catalyst mailing list