wu-lee has asked for the wisdom of the Perl Monks concerning the following question:
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?
|
|---|