Skip Menu |

This queue is for tickets about the CPAN CPAN distribution.

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

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

Bug Information
Severity: Unimportant
Broken in: 1.87
Fixed in: (no value)



Subject: CPAN::Shell->install and CPAN::Shell->expandany($mod)->install are not the same.
The docs claim... CPAN::Shell->install($mod); # same thing CPAN::Shell->expandany($mod)->install; # same thing CPAN::Shell->expand("Module",$mod)->install; # same thing CPAN::Shell->expand("Module",$mod) ->distribution->install; # same thing But they're not. The first calls (I believe) CPAN::Bundle->install and the rest call (I believe) CPAN::Distribution->install. The important difference appears to be that CPAN::Bundle->install calls rematein() while CPAN::Distribution->install does not. Without this, following prerequisites does not work. For some reason when CPAN::Shell->expandany($mod)->install; is used unsat_prereq is called twice during a module's installation, sponsored_mods is already set and CPAN.pm thinks something else is already taking care of it. See [rt.cpan.org 21139] for an example of a problem this caused.
Subject: Re: [rt.cpan.org #21144] CPAN::Shell->install and CPAN::Shell->expandany($mod)->install are not the same.
Date: Wed, 23 Aug 2006 09:00:31 +0200
To: bug-CPAN [...] rt.cpan.org
From: andreas.koenig.gmwojprw [...] franz.ak.mind.de (Andreas J. Koenig)
Show quoted text
>>>>> On Wed, 23 Aug 2006 01:24:55 -0400, "Michael_G_Schwern via RT" <bug-CPAN@rt.cpan.org> said:
Show quoted text
> Wed Aug 23 01:24:54 2006: Request 21144 was acted upon. > Transaction: Ticket created by MSCHWERN > Queue: CPAN > Subject: CPAN::Shell->install and CPAN::Shell->expandany($mod)->install > are not the same. > Broken in: 1.87 > Severity: Unimportant > Owner: Nobody > Requestors: MSCHWERN@cpan.org > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21144 >
Show quoted text
> The docs claim...
Show quoted text
> CPAN::Shell->install($mod); # same thing > CPAN::Shell->expandany($mod)->install; # same thing > CPAN::Shell->expand("Module",$mod)->install; # same thing > CPAN::Shell->expand("Module",$mod)
-> distribution->install; # same thing Show quoted text
> But they're not. The first calls (I believe) CPAN::Bundle->install and > the rest call (I believe) CPAN::Distribution->install. The important > difference appears to be that CPAN::Bundle->install calls rematein() > while CPAN::Distribution->install does not. Without this, following > prerequisites does not work. For some reason when > CPAN::Shell->expandany($mod)->install; is used unsat_prereq is called > twice during a module's installation, sponsored_mods is already set and > CPAN.pm thinks something else is already taking care of it.
I cannot follow your argument, I'm missing a prove. Show quoted text
> See [rt.cpan.org 21139] for an example of a problem this caused.
When I see $obj->force('install') I jump out of the window because I cannot imagine what this should do. Is this documented anywhere? The other thing is that my $rv = $obj->install || eval ...; is always wrong thing to do. install() does not give a meaningful return value and I regret that this was never well documented. -- andreas
Closing as Wontfix && Aintbroken :) Thanks,
On Sat Sep 30 07:54:20 2006, ANDK wrote: Show quoted text
> Closing as Wontfix && Aintbroken :) > > Thanks,
*shoves foot in door* Not so fast Mister. Here's a simple example. $ sudo perl -MCPAN -we 'CPAN::Shell->expand( Module => shift )->install;' File::Find::Rule vs $ sudo perl -MCPAN -we 'CPAN::Shell->install(shift);' File::Find::Rule Note that the former does not do dependency resolution. If any of File::Find::Rule's dependencies are not installed it will simply stop. The latter will install File::Find::Rule's dependencies. The docs claim they are the same thing. They are not. This lead to a bug in Module::AutoInstall (see rt.cpan.org 21139) where it was not installing dependencies.
Subject: Re: [rt.cpan.org #21144] CPAN::Shell->install and CPAN::Shell->expandany($mod)->install are not the same.
Date: Mon, 09 Oct 2006 05:16:21 +0200
To: bug-CPAN [...] rt.cpan.org
From: andreas.koenig.gmwojprw [...] franz.ak.mind.de (Andreas J. Koenig)
Show quoted text
>>>>> On Sun, 08 Oct 2006 05:22:26 -0400, "Michael_G_Schwern via RT" <bug-CPAN@rt.cpan.org> said:
Show quoted text
mgsvr> 'CPAN::Shell->expand( Module => shift mgsvr> )->install;' File::Find::Rule
Bang! Now I'm impressed. I forgot about the Queue. Will fix before the next release. In which direction is not yet clear. -- andreas
Fixed in 1.88_54 by changing the documentation. Thanks!