Re: [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 20:19:48
|
On Thu, Aug 28, 2003 at 09:05:11AM -0500, Ken Williams wrote:
> Here's how I'll apply - actually, I've got two variants, which one
> should I use? I.e., how unique is 'verbose'?
Both your patches won't don't translate "perl Makefile.PL verbose verbose"
to verbose=2 which is how it should work. Though at this time it doesn't
look like you have verbosity levels in Module::Build.
Looking at the MM argument parsing code, I think the only other special
argument is 'help'. However...
$ perl Makefile.PL help
Undefined subroutine &ExtUtils::MakeMaker::help called at lib/ExtUtils/MakeMaker.pm line 664.
So I wouldn't worry about that. :)
> 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}) {
>
--
Michael G Schwern sc...@po... http://www.pobox.com/~schwern/
"Let's face it," said bearded Rusty Simmons, opening a can after the
race. "This is a good excuse to drink some beer." At 10:30 in the
morning? "Well, it's past noon in Dublin," said teammate Mike
[Joseph] Schwern. "It's our duty."
-- "Sure, and It's a Great Day for Irish Runners"
Newsday, Sunday, March 20, 1988
|