Skip Menu |
 

This queue is for tickets about the MooseX-Object-Pluggable CPAN distribution.

Report information
The Basics
Id: 39525
Status: open
Priority: 0/
Queue: MooseX-Object-Pluggable

People
Owner: Nobody in particular
Requestors: ctbrown [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.0008
Fixed in: (no value)



Download (untitled) / with headers
text/plain 423b
It is sometimes desirable to (un)set _plugin_ns to "": $app->_plugin_ns( "" ); This is particularly true when your plugins will come from different _plugin_app_ns, i.e. [ "mymod::Modules", "mymod::Plugin" ] Perhaps the idea of _plugin_ns and _plugin_app_ns should be collapsed into one ArrayRef. This would make the interface simpler and have less of a cognitive load on the developer. Otherwise, good module.
Here is the patch to Pluggable.pm to fix the problem: --- Pluggable.pm.bak 2008-09-22 19:16:17.000000000 -0700 +++ Pluggable.pm 2008-09-22 19:16:46.000000000 -0700 @@ -207,7 +207,12 @@ return $1 if( $plugin =~ /^\+(.*)/ ); - my $o = join '::', $self->_plugin_ns, $plugin; + my $o; + if ( $plugin ) { + $o = join '::', $self->_plugin_ns, $plugin; + } else { + $o = $plugin + } #Father, please forgive me for I have sinned. my @roles = grep{ /${o}$/ } $self->_plugin_locator->plugins; On Mon Sep 22 21:59:54 2008, CTBROWN wrote: Show quoted text
> It is sometimes desirable to (un)set _plugin_ns to "": > > $app->_plugin_ns( "" ); > > This is particularly true when your plugins will come from different > _plugin_app_ns, i.e. [ "mymod::Modules", "mymod::Plugin" ] > > Perhaps the idea of _plugin_ns and _plugin_app_ns should be collapsed > into one ArrayRef. This would make the interface simpler and have less > of a cognitive load on the developer. > > Otherwise, good module.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.