[PATCH] Re: [Module-build-general] Breaking CPAN installs using M::B
Status: Beta
Brought to you by:
kwilliams
|
From: Michael G S. <sc...@po...> - 2003-08-28 03:41:31
|
On Wed, Aug 27, 2003 at 10:41:19PM -0400, Soren A wrote:
> And that is a problem. IMHO, M::B and portability scripts which enable
> it's use from the traditional MakeMaker-based invocation `perl
> makefile.PL', *must* support or at least parse and accept without error,
> *all* the things that have been possible to pass as arguments to that
> familiar routine.
As the vast majority of the arguments Makefile.PL accept make no sense for
Module::Build, or are prohibitively complicated to backport, this will
never happen.
As for silently accepting old Makefile.PL commands which it does not
implement, this sounds sketchy. At minimum a warning should be issued.
I think an error is ok since, in my world, its better to stop working
then ignore user input and bull forward. Consider, for example,
the consequences of ignoring 'DESTDIR' or 'PREFIX'. But that's up to Ken.
Module::Build should deal with the most common arguments one would put
into something automated like the CPAN shell. verbose must have
slipped by. Its a bit odd, it doesn't follow the convention of a lot
of others.
Here's a patch for it.
--- lib/Module/Build/Compat.pm 2003/08/28 03:35:44 1.1
+++ lib/Module/Build/Compat.pm 2003/08/28 03:38:21
@@ -95,7 +95,13 @@
sub makefile_to_build_args {
shift;
my @out;
+ my $verbose = 0;
foreach my $arg (@_) {
+ if( $arg eq 'verbose' ) { # special case for verbose
+ $verbose++;
+ next;
+ }
+
my ($key, $val) = $arg =~ /^(\w+)=(.+)/ or die "Malformed argument '$arg'";
if (exists $Config{lc($key)}) {
push @out, 'config=' . lc($key) . "=$val";
@@ -107,6 +113,9 @@
push @out, "\L$key\E=$val";
}
}
+
+ push @out, "verbose=$verbose" if $verbose;
+
return @out;
}
--
Michael G Schwern sc...@po... http://www.pobox.com/~schwern/
I know you get this a lot, but what's an unholy fairy like you doing in a
mosque like this?
|