Skip Menu |

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

Report information
The Basics
Id: 59507
Status: resolved
Priority: 0/
Queue: Module-Pluggable

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

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



Subject: Feature request: ISA
A really cool feature for a lot of plug-ins could be to collect only those which are derived from a specific base class: eval { require $module; }; push( @list, $modname ) if( !$@ and $modname->isa( $config{is_a} );
On Sun Jul 18 10:05:44 2010, REHSACK wrote: Show quoted text
> A really cool feature for a lot of plug-ins could be to collect only > those which are derived from a specific base class: > eval { > require $module; > }; > push( @list, $modname ) if( !$@ and $modname->isa( $config{is_a} );
I've just created a new branch called triggers https://github.com/simonwistow/Module-Pluggable/tree/triggers that should help with this feature request. Have a look at https://github.com/simonwistow/Module-Pluggable/blob/triggers/t/22trigger.t in this case what you'd do is package MyModule; use Module::Pluggable require => 1, after_require => sub { !(shift->isa('IO::Handle') }; Can you take a look and see if that meets your needs?
On Tue Mar 27 20:55:37 2012, SIMONW wrote: Show quoted text
> Can you take a look and see if that meets your needs?
Just look at the description (didn't try) and it looks like it fully satisfy my requirements. Thanks a lot! Jens
Now released as 4.1