Module::Pluggable can work, perhaps combined with File::HomeDir :)
For DIY, say you have : FLV::Info, Image::Info, MP3::Info ...
you could have MyStuff->load_plugins (Module::Load) ... MyStuff->register_plugin ... if( $thisplugin->do_run_run( $item,... ) ){ next } ....
Module::Pluggable arranges for this by naming convention so plugins don't need to register themselves (use MyStuff::Plugin; or MyStuff->register_plugin(__PACKAGE__) ), they just name themselves correctly :) (MyStuff::Plugin::Me)
Examples of this sort of thing can be found at mimetype,mimeopen, openit, Re^2: LWP to open a new browser window, Wx::Demo
It is a global DispatchTable :) Also useful food for thought The Architecture of Open Source Applications
In reply to Re: Recommendations for adding plugin/addon capability to a program
by Anonymous Monk
in thread Recommendations for adding plugin/addon capability to a program
by atcroft
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |