I didn’t even know that dependencies could be optional. There certainly isn’t anything intuitive about that idea, at least to me.

Arguably, supporting HTTPS can, as of recently, be considered required. So, in the specific case of LWP::Protocol::https, perhaps that should now be required.

As for "optional features" in general, perhaps a better way of handling those? I suppose one could argue that optional feature "bar" of module "Foo" should be used via module "Foo::Bar". but, going back to the OP's use of LWP, would you really want to have to call different "get" methods for different URL schemas? Or would you rather one "get" that looks at the "https:" or "ftp:" at the front of the URL and figure out which protocol to use?

I suggest that, as an option, modules devs be able to specify "additional dependencies" as a hash of lists mapping "optional features" to the additional modules required to support said optional features. I'm not sure how best to to handle such options during module install, but having a feature/requirement map available will help with managing installed modules.


In reply to Re^3: common non-explicit dependencies besides LWP::Protocol::https ? by RonW
in thread common non-explicit dependencies besides LWP::Protocol::https ? by jae_63

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.