On Mon, Jul 18, 2011 at 3:54 PM, Tomas Doran <bobtf...@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_%29>
> )
>
> 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 => [ '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' => sub {
        my $orig = 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
_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to