Perhaps you could have raised a RT ticket for this issue.

Perhaps then either myself or Jos would have been able to investigate the issue. It is only because I happened to being checking perlmonks today that I spotted this.

You hit the nail on the head, it is the distributions that have package names that are slightly unusual that parse_module has a problem with. In the vast majority of cases it can make an educated guess and get it right.

CPANPLUS' module tree is exactly that, a tree of modules, which includes the name of the package that that module is contained in. Creating a mapping back the other way as well, ie. PACKAGE -> MODULE, is going to add more memory usage for the indexes.

That said, there may be a way. I'm digging further.

But please, do raise that ticket, so I don't forget.

CPANPLUS RT Queue

Updated:

Found a possible solution which I will endeavour to roll into the next release. In the meantime this should work for those pesky edge-cases:

use strict; use warnings; use CPANPLUS::Backend; my $cb = CPANPLUS::Backend->new(); my $string = shift || die; my $mod; unless ( $mod = $cb->parse_module( module => $string ) ) { ($mod) = grep { $_->package_name eq $string } $cb->search( type => 'package', allow => [ qr/^\Q$str +ing\E/ ], ); } print $mod->name, ' ', $mod->package, "\n" if $mod;

In reply to Re: CPANPLUS won't install distros by name (e.g. Scalar-List-Utils) by bingos
in thread 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.