in reply to How to make plugins
I refer you to the Wikipedia entry on plugin. Plugins and extensions are about adding optional functionality to an application.
I'm interesting in different techniques: based on directory structure or modules/objects hierarchy, auto-loaded and load on demand etc - all that can have sense.
The concept behind a plugin is that the core application will still work if the plugin has not been installed. What you are talking about is code that has been installed on the target machine, but not loaded into the Perl interpreter. This is provided in the core module autouse, or you can roll your own with AUTOLOAD subs and/or run time require.
Plugin architectures on the other hand, can and have been done in Perl many times. The concept is relatively painless, owing to the dynamic nature of the language. A CPAN search for plugin shows a variety of modules that use this concept. I draw your attention in particular to Module::Pluggable, and my own Module::Optional as generic tools for plugins in the sense defined in the wikipedia article.
--
Oh Lord, won’t you burn me a Knoppix CD ?
My friends all rate Windows, I must disagree.
Your powers of persuasion will set them all free,
So oh Lord, won’t you burn me a Knoppix CD ?
(Missquoting Janis Joplin)
|
|---|