I'm writing this application that's going to run as a CGI script on a FreeBSD system. I want to make it as expandable as possible ... Then it hit me, a plugin based perl application. It only has features of the plugins that I put into a select directory.

My question is quite simple. What are your all's thoughts on implementing something like this? I have a general basis on how to do this, but I thought I'd get some feedback from the Perl community and see how they would approach this.

Any thoughts?
I've thought of using a public variable (via export or use vars) that will store actions mapped to the functions that take care of them.
And A public object was passed my way. Now, I'm not tooo... sure about the implementation on this. Inheritance is not as clear in Perl as it is in C++. Or an I totally thinking the wrong direction with this idea?


In reply to Plugin based Perl app by guice

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.