I like the idea of not enabling the AUTOLOAD trapping to generate run-time version check redirection unless explicitly enabled.

But, using () on use disables any call to import, so that's a complicating factor to using this syntax.

Your last point: If I understand, suppose Module::Foo is not itself versioned via redirecting it to Foo_old or Foo_new. It's simply named Foo. It might contain an explicitly-coded run-time check to see if the client wants new behavior or old behavior. It can find out by calling a method on the blessed %EXPORT definition. If Foo calls _helper which then needs to know, it does it the same way.

Ah, but that behavior is coded into the function directly and won't care if I call the imported link or the direct function, since they both work the same. So a switch to enable/disable the versioning is not going to mean anything to it. But there is no confusion, since the user asked for a specific version of Foo, regardless of what else he asked for. (It implies that I need per-function memory on this, rather than a single setting)

—John


In reply to Re: (tye)Re: How should this work ? (design of Exporter::VA) by John M. Dlugosz
in thread How should this work ? (design of Exporter::VA) by John M. Dlugosz

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.