Module::Pluggable::Object and Class:MOP should be a good start. There's an example of doing this in the new Catalyst book. Something along the lines of this (not-tested code) should work
Depending on how your search_path is, you may need to muck with the class name before calling new (like strip off the leading path).my $mp = Module::Pluggable::Object->new( search_path => [ "/path/to/classes" ] ); my @classes = $mp->plugins; # choose which class from classes Class::MOP::load_class( $class ); return $class->new;
In reply to Re: Dynamic inheritance with Moose?
by derby
in thread Dynamic inheritance with Moose?
by Shinama
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |