Creating a "Plug-In" Framework for a Moduleby ajt (Prior)
|on Jan 30, 2006 at 13:33 UTC||Need Help??|
ajt has asked for the
wisdom of the Perl Monks concerning the following question:
I have some old code that I want to turn into a module, see Old Templating Engine. It's very simple really the only messy bit is that there can be several different ways of doing the same thing.
Rather than create one large monolitic OO module, I'd rather create a core module and then a set of plug-ins that add the extra functionality. If a given plug-in in isn't installed then it's not an available. If two plug-ins are installed that provide the same function, then the module and the end user would get to choose which plug-in to use.
I've done some searching, but I mostly get matches from modules that are plug-ins, not how to create the framework.
Any guidance on how to create a module that will accept a family of other modules as plug-ins?
As ever thanks in advance.