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)


In reply to Re: How to make plugins by rinceWind
in thread How to make plugins by cub.uanic

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.