Re: [Module::Build] Small bug fixed in Module::Build passthrough Makefile.PL
Status: Beta
Brought to you by:
kwilliams
|
From: Yitzchak Scott-T. <sth...@ef...> - 2006-03-03 14:30:13
|
On Wed, Mar 01, 2006 at 09:42:21PM -0600, Ken Williams wrote:
> Hi,
>
> Since it's come up on both these lists recently I thought I should
> mention this and ask for a little feedback. Today I committed a
> patch to Module::Build::Compat:
>
> --- Compat.pm 3 Dec 2005 03:08:14 -0000 1.73
> +++ Compat.pm 1 Mar 2006 22:46:22 -0000 1.74
> @@ -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?
>
> Anyway, this certainly improves its bootstrapping, and probably is
> good enough to go in 0.28? Anyone (dis)?agree, either on facts or
> opinions?
If the install does in fact fail, does the user end up with an error
later on that is hard to track down to the installation having failed?
(Test by just commenting out the ->install line and see what happens.)
If so, after the ->install(), try eval {require
Module::Build::Compat;} and die with an error if it fails?
BTW, can we get a 0.27_08 release soon? There've been a lot of changes
since 0.27_07.
|