in reply to Recommendations for adding plugin/addon capability to a program

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

  • Comment on Re: Recommendations for adding plugin/addon capability to a program