Okay, very cool from what I've seen above I've pretty much written the plugin system as far as having the methods/variables/data I need available to the central App, thanks SO much for the help

Now another related question/solution. Since most of this runs as sort of an "Event Loop" I've written an initialization routine for each module so that gets called when it's first included.

what I'd like to do is have the available functions/necessary calls to be put into a hash or list where they can be called when their needed, basically the equivalent of having a pointer to a function in C, can I do something like:

foreach (keys %FunctionHash) { $return = &callMySub($_); # Do somethign with return here }
or would there be a better method. Basically all of the modules export the same functions, but since each plugin is configurable there may be some that the end user (myself) may not wish to execute.....

Note: I know I could make this much simpler just by saying you have one function that does everythign and if you get more data then you want, tough cookies. However management doesn't like that method....

In reply to Re: Writing Plugin-Able perl scripts by Gurft
in thread Writing Plugin-Able perl scripts by Gurft

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.