Re: [PATCH] Re: [Module-build-general] Breaking CPAN installs using M::B
Status: Beta
Brought to you by:
kwilliams
|
From: Ken W. <ke...@ma...> - 2003-08-28 14:05:23
|
On Wednesday, August 27, 2003, at 10:40 PM, Michael G Schwern wrote:
>
> 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.
>
Here's how I'll apply - actually, I've got two variants, which one
should I use? I.e., how unique is 'verbose'?
-Ken
Index: lib/Module/Build/Compat.pm
===================================================================
RCS file:
/cvsroot/module-build/Module-Build/lib/Module/Build/Compat.pm,v
retrieving revision 1.29
diff -u -r1.29 Compat.pm
--- lib/Module/Build/Compat.pm 13 Aug 2003 15:27:27 -0000 1.29
+++ lib/Module/Build/Compat.pm 28 Aug 2003 14:01:46 -0000
@@ -96,7 +96,9 @@
shift;
my @out;
foreach my $arg (@_) {
- my ($key, $val) = $arg =~ /^(\w+)=(.+)/ or die "Malformed argument
'$arg'";
+ my ($key, $val) = ($arg =~ /^(\w+)=(.+)/ ? ($1, $2) :
+ $arg =~ /^(\w+)$/ ? ($1, 1) :
+ die "Malformed argument '$arg'");
if (exists $Config{lc($key)}) {
push @out, 'config=' . lc($key) . "=$val";
} elsif (exists $makefile_to_build{$key}) {
Index: lib/Module/Build/Compat.pm
===================================================================
RCS file:
/cvsroot/module-build/Module-Build/lib/Module/Build/Compat.pm,v
retrieving revision 1.29
diff -u -r1.29 Compat.pm
--- lib/Module/Build/Compat.pm 13 Aug 2003 15:27:27 -0000 1.29
+++ lib/Module/Build/Compat.pm 28 Aug 2003 14:02:13 -0000
@@ -96,7 +96,9 @@
shift;
my @out;
foreach my $arg (@_) {
- my ($key, $val) = $arg =~ /^(\w+)=(.+)/ or die "Malformed argument
'$arg'";
+ my ($key, $val) = ($arg =~ /^(\w+)=(.+)/ ? ($1, $2) :
+ $arg =~ /^(verbose)$/ ? ($1, 1) :
+ die "Malformed argument '$arg'");
if (exists $Config{lc($key)}) {
push @out, 'config=' . lc($key) . "=$val";
} elsif (exists $makefile_to_build{$key}) {
|