You still haven't given us a big picture. I can imagine various scenarios where you are providing an engine (web site, build system, data server, ...) where you want to provide a plug in system for users. There are well established techniques for doing those jobs and none of them require the engine to know implementation details of the plug ins.

Maybe you have a task that is quite different, but it's a pretty good bet that the techniques used for plug in architectures can be applied here.

Something to think about is either requiring your users to use a common interface or even to derive their code from a common base class you provide. On the face of it your problem would be solved if your users bend a little, or even if you write shims around their code, so that your engine doesn't become a maintenance nightmare.

Premature optimization is the root of all job security

In reply to Re^3: Call sub in variable module by GrandFather
in thread Call sub in variable module by tel2

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.