Thanks for the feedback.

I was not aware of the autouse pragma. Sadly, it requires that the module name be explicit (no regex, no callback), and that the subroutine names which should trigger loading also be explicit. It seems at first glance to do what Class::LazyLoad does, though there may be subtle details I've missed.

I did discover Class::Autouse and also the "later" pragma in the process of finding "autouse", though. These both much closer to my module.

Both of these require explicit package names, but use AUTOLOAD so they can be method agnostic. The "later" pragma seems to have more features, but none I need, and with the additional restriction that it only applies in the namespace it is used-from, which will break things for me.

Thanks for pointing me in the right direction!
I'll contact the authors now...


In reply to Re^2: appropriate name/place for module which does JIT loading of modules by sakoht
in thread appropriate name/place for module which does JIT loading of modules by sakoht

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.