Take a look at
Class::AutoPlug. It uses attributes to allow you to declaratively build pluggable versions of non-pluggable modules using attributes and some clever uses of import().
Essentially, your pluggable main class looks like
package Something::Pluggable;
use base qw(Class::Autoplug::Pluggable);
1;
and your plugins look like
package Something::Plugin::Foo;
use base qw(Class::AutoPlug::Plugin);
sub x:PluggedMethod(methodName) { ...}
sub y:Prehook(someBaseMethod) { ... }
sub z:Posthook(someBaseMethod) { ... }
1;
All the monkey code to find the methods, add hooks, etc., is handled inside the base classes, letting you concentrate on the actual job at hand. Attributes make it easy to define what you want declaratively, without stuff like having to construct lists of methods and hooks.