I'm currently between a rock and a hard place and I want to do something e-vil to work around the problem.

I'm currently using Module::Pluggable in Handel to load plugins for the checkout process. It currently loads all available plugins in any given namespace, but I'm tweaking the config to ignore specified plugins, or also to load just the listed plugins. Module::Pluggable currently has the except and only options available in its use statement.

Normally, this would be a no brainer...change my use statement in the begin block to a require/import during new() and pass the appropriate oprions from the config into except/only.

However, currently my use statement also specifies a minimum version of M::P of 2.9. Is there some special encantation whereby you can pass the version into require or into import()?

Sure, I suppose I could just die after require if M::P->VERSION is lower than 2.9, but I was looking for something cleaner, something closer to use Module::Pluggable 2.9;


In reply to How do I require a specific version? by jk2addict

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.