Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re^3: [rant] Of the suckage of the CPAN shell

by TilRMan (Friar)
on Jul 12, 2006 at 03:36 UTC ( #560606=note: print w/replies, xml ) Need Help??

in reply to Re^2: [rant] Of the suckage of the CPAN shell
in thread [rant] Of the suckage of the CPAN shell

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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://560606]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2016-10-24 00:32 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (302 votes). Check out past polls.