I've noticed CPANPLUS's CLI, cpanp can install WWW-Mechanize, but not Scalar-List-Utils. This seems wrong, since it ought to know that this is a valid distribution. (I chose WWW-Mechanize because it is a distribution which happens to contain a module called WWW::Mechanize; Scalar-List-Utils contains no Scalar::List::Utils module.)

$ cpanp CPANPLUS::Shell::Default -- CPAN exploration and module installation ( +v0.88) [snip] CPAN Terminal> install Scalar-List-Utils [ERROR] 'Scalar-List-Utils' does not contain an author part [ERROR] Cannot find 'Scalar-List-Utils' in the module tree No such module: Scalar-List-Utils No modules found to operate on! Nothing done

This is the latest version of CPANPLUS, v0.88.

Indeed, it cannot install PathTools (Cwd and File::Spec), libwww-perl (the LWP modules), nor perl-ldap (Net::LDAP et al.). It seems that if the distribution is not also the name of a module it includes, CPANPLUS can't find it.

The reason I ask about this is because I encountered this problem using CPANPLUS::Backend->parse_module, which has a similar problem, even though the manpage for it implies it can handle multiple forms of module names and distribution names:

parse_module tries to find a CPANPLUS::Module object that matches your + query. Here's a list of examples you could give to parse_module; Text::Bastardize Text-Bastardize Text-Bastardize-1.06 AYRNIEU/Text-Bastardize AYRNIEU/Text-Bastardize-1.06 AYRNIEU/Text-Bastardize-1.06.tar.gz http://example.com/Text-Bastardize-1.06.tar.gz file:///tmp/Text-Bastardize-1.06.tar.gz /tmp/Text-Bastardize-1.06 ./Text-Bastardize-1.06

And elsewhere:

@mods can be a list of distribution names, module names or module obje +cts, basically anything that parse_module can understand.

But parse_module fails if given Scalar-List-Utils etc. Presumably either the documentation or the implementation is wrong? How do I get a CPANPLUS::Module instance from a distribution name?


In reply to CPANPLUS won't install distros by name (e.g. Scalar-List-Utils) by wu-lee

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.