[Module::Build] Small bug fixed in Module::Build passthrough Makefile.PL
Status: Beta
Brought to you by:
kwilliams
|
From: Ken W. <ke...@ma...> - 2006-03-02 03:42:27
|
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?
-Ken
|