Skip Menu |

This queue is for tickets about the CPAN CPAN distribution.

Report information
The Basics
Id: 21989
Status: resolved
Priority: 0/
Queue: CPAN

People
Owner: Nobody in particular
Requestors: adamk [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Make "cpan install Some::Module" do what people mean
I could not count the number of times I've seem someone do Show quoted text
> cpan install Module::Name
What happens, of course, is that because some random distribution called "junoscript" happens to have an "install" module in it, that command installs junoscript first, THEN the module you actually want. This gets bad if the junoscript installation fails, because then people are left with what they incorrectly think that the module they want has failed. I think this gotcha comes about because people do Show quoted text
cpan> install Module::Name
in the shell, and so just assume that they can Show quoted text
> cpan install Module::Name
Now, we could always warn, but as the Ruby people say, if you are smart enough to warn, you are smart enough to Do The Right Thing. So I think we should make the following possible. If you pass 2 or more params to the cpan console application, and the first one is "install" (and possible also other command names) then "install" is taken to mean "-i". So install the ACTUAL "install" module you could continue to do Show quoted text
> cpan install
As normal, or Show quoted text
> cpan install install
would also work. I think this will just make live more sane for the general userbase, who I often see make that mistake. I'd be happy to implement it for you if needed.
CC: "brian d. foy" <brian.d.foy [...] gmail.com>
Subject: Re: [rt.cpan.org #21989] Make "cpan install Some::Module" do what people mean
Date: Tue, 10 Oct 2006 20:51:57 +0200
To: bug-CPAN [...] rt.cpan.org
From: andreas.koenig.gmwojprw [...] franz.ak.mind.de (Andreas J. Koenig)
Traditionally I leave questions about the cpan wrapper script to brian's brains. brian, could you please take over? Thanks, -- andreas Show quoted text
>>>>> On Tue, 10 Oct 2006 04:05:11 -0400, " via RT" <bug-CPAN@rt.cpan.org> said:
Show quoted text
> Tue Oct 10 04:05:10 2006: Request 21989 was acted upon. > Transaction: Ticket created by ADAMK > Queue: CPAN > Subject: Make "cpan install Some::Module" do what people mean > Broken in: (no value) > Severity: Wishlist > Owner: Nobody > Requestors: ADAMK@cpan.org > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21989 >
Show quoted text
> I could not count the number of times I've seem someone do
Show quoted text
>> cpan install Module::Name
Show quoted text
> What happens, of course, is that because some random distribution called > "junoscript" happens to have an "install" module in it, that command > installs junoscript first, THEN the module you actually want.
Show quoted text
> This gets bad if the junoscript installation fails, because then people > are left with what they incorrectly think that the module they want has > failed.
Show quoted text
> I think this gotcha comes about because people do
Show quoted text
cpan> install Module::Name
Show quoted text
> in the shell, and so just assume that they can
Show quoted text
>> cpan install Module::Name
Show quoted text
> Now, we could always warn, but as the Ruby people say, if you are smart > enough to warn, you are smart enough to Do The Right Thing.
Show quoted text
> So I think we should make the following possible.
Show quoted text
> If you pass 2 or more params to the cpan console application, and the > first one is "install" (and possible also other command names) then > "install" is taken to mean "-i".
Show quoted text
> So install the ACTUAL "install" module you could continue to do
Show quoted text
>> cpan install
Show quoted text
> As normal, or
Show quoted text
>> cpan install install
Show quoted text
> would also work.
Show quoted text
> I think this will just make live more sane for the general userbase, who > I often see make that mistake.
Show quoted text
> I'd be happy to implement it for you if needed.
From: BDFOY [...] cpan.org
On Tue Oct 10 04:05:10 2006, ADAMK wrote: Show quoted text
> I could not count the number of times I've seem someone do >
> > cpan install Module::Name
Show quoted text
> Now, we could always warn, but as the Ruby people say, if you are smart > enough to warn, you are smart enough to Do The Right Thing.
I explained the reason I don't do this in the last bug someone submitted for this. I initially tried to make the change and got bogged down in a can of worms: In short: * I never intended my cpan script to be a one-liner for CPAN.pm * I don't want to support every CPAN.pm command * Breaking the interface for this special case leads to more special cases as people wonder why it doesn't do everything that CPAN.pm does. * It requires an almost total rewrite to handle this I've told Andreas that he's free to replace my script if someone wants to make a different one to handle all of this, but the script I wrote is fine.
Seems to be fixed now.