Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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

by TilRMan (Friar)
on Jul 12, 2006 at 03:36 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-12-07 01:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which IDE have you been most impressed by?













    Results (49 votes). Check out past polls.