[Module::Build] Re: Small bug fixed in Module::Build passthrough Makefile.PL
Status: Beta
Brought to you by:
kwilliams
|
From: <and...@fr...> - 2006-03-04 15:36:15
|
>>>>> On Wed, 1 Mar 2006 21:42:21 -0600, Ken Williams <ke...@ma...> said:
> @@ -90,8 +90,8 @@
> # Save this 'cause CPAN will chdir all over the place.
> my $cwd = Cwd::cwd();
> - CPAN::Shell->install('Module::Build::Compat')
> - or die " *** Cannot install without Module::Build. Exiting ...\n";
> + # There seems to be no way to determine if this install was
> successful
> + CPAN::Shell->install('Module::Build::Compat');
> chdir $cwd or die "Cannot chdir() back to $cwd: $!";
> }
> I did this because I was on Cygwin installing a module that had a
> passthrough Makefile.PL, and I didn't have M::B already installed.
> It offered to use CPAN.pm to install M::B for me, which succeeded,
> and then it died with the above error message, because install()
> returned false even when it was successful.
> Inspecting the CPAN.pm code, I can't quite see *why* it returned
> false, but the docs don't say it returns any value in particular, so
> I thought I shouldn't rely on one. I think it might be the case that
> different versions of CPAN return different values, perhaps?
One of the mysteries of CPAN.pm are return codes. Maybe we will get
them some day, but for the time being you have
$module->uptodate
to test for a module being up-to-date.
--
andreas
|