I've fallen for the 'cpan install' feature so many times without knowing why that I've just gotten in the habit of using perl -MCPAN. Now that I know why, I'd say the interface of cpan(1) violates the Principle of Lease Surprise, but that's just me. To illustrate:

$ perl -MCPAN -e shell # Right cpan> install Foo $ perl -MCPAN -e 'install Foo' # Right $ cpan # Right cpan> install Foo $ cpan install Foo # WRONG!

I think a good compromise would be to special case the distro called 'install' and have cpan(1) refuse to install it unless the -i option is thrown explicitly (or if it is the only item listed, perhaps). And a nice helpful error message if it isn't, such as:

It appears you may be trying to install the 'install' distribution. If this is what you want, use the -i flag as well. If what you really want is to install the '@ARGV[1..-1]' module(s), use the -i flag and omit install. Read perldoc cpan for more information.

And then put a lengthy discussion in the manpage.

I think a good solution would involve the compromise above, plus the deletion of the 'install' distribution, plus the lifetime imprisonment of anyone who ever does or ever has uploaded a distribution called 'install'. But that's just me.


In reply to Re^3: [rant] Of the suckage of the CPAN shell by TilRMan
in thread [rant] Of the suckage of the CPAN shell by Anonymous Monk

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.