Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

A few patches from several weeks ago

git-svn-id: http://svn.perl.org/modules/Module-Build/trunk@4860 50811bd7-b8ce-0310-adc1-d9db26280581
  • Loading branch information...
commit c472542c57bd7593e0ee1955a77dbe5aa70374f1 1 parent 6e17aa8
@kenahoo kenahoo authored
Showing with 1,535 additions and 0 deletions.
  1. +160 −0 patches/patch.2004-03-13
  2. +1,365 −0 patches/plugin-patch
  3. +10 −0 patches/version.patch
View
160 patches/patch.2004-03-13
@@ -0,0 +1,160 @@
+Index: lib/Module/Build/Base.pm
+===================================================================
+RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v
+retrieving revision 1.267
+diff -u -b -r1.267 Base.pm
+--- lib/Module/Build/Base.pm 4 Mar 2004 00:08:20 -0000 1.267
++++ lib/Module/Build/Base.pm 13 Mar 2004 21:41:33 -0000
+@@ -332,13 +332,14 @@
+ include_dirs
+ bindoc_dirs
+ libdoc_dirs
++ config
+ );
+
+ sub valid_property { exists $valid_properties{$_[1]} }
+
+- # Create an accessor for each property that doesn't already have one
+- foreach my $property (keys %valid_properties) {
+- next if __PACKAGE__->can($property);
++# Create an accessor for each property that doesn't already have one
++foreach my $property (keys %valid_properties) {
++ unless( __PACKAGE__->can($property)) {
+ no strict 'refs';
+ *{$property} = sub {
+ my $self = shift;
+@@ -346,6 +347,16 @@
+ return $self->{properties}{$property};
+ };
+ }
++ my $set_property_method = "_set_property_$property";
++ unless( __PACKAGE__->can($set_property_method)) {
++ no strict 'refs';
++ *{$set_property_method} = sub {
++ my $self = shift;
++ $self->{properties}{$property} = shift if @_;
++ return $self->{properties}{$property};
++ };
++ }
++}
+ }
+
+ sub extra_compiler_flags {
+@@ -914,6 +925,25 @@
+ }
+ }
+
++## parse "key=val" into {key=>"val"}
++sub _parse_shared_args {
++ my ($self, $prop, $sh_args ) =@_;
++
++ unless(defined($sh_args)) { $sh_args = []; }
++ $sh_args = [ $sh_args ] unless ref $sh_args;
++ return $sh_args unless( ref $sh_args eq 'ARRAY' ); # if is Href
++
++ # is Aref
++ my $hash={};
++ foreach my $arg ( @{$sh_args} ) {
++ $arg =~ /(\w+)=(.+)/
++ or die "Malformed '$prop' argument: '$arg' ".
++ "should be something like 'foo=bar'";
++ $hash->{$1} = $2;
++ }
++ return $hash;
++}
++
+ sub read_args {
+ my $self = shift;
+ my ($action, %args, @argv);
+@@ -930,44 +960,22 @@
+ }
+ }
+ $args{ARGV} = \@argv;
+-
+- # 'config' and 'install_path' are additive by hash key
+- my %additive = map {$_, 1} qw(config install_path);
+-
+- # Hashify these parameters
+- for (keys %additive) {
+- next unless exists $args{$_};
+- my %hash;
+- $args{$_} ||= [];
+- $args{$_} = [ $args{$_} ] unless ref $args{$_};
+- foreach my $arg ( @{$args{$_}} ) {
+- $arg =~ /(\w+)=(.+)/
+- or die "Malformed '$_' argument: '$arg' should be something like 'foo=bar'";
+- $hash{$1} = $2;
+- }
+- $args{$_} = \%hash;
+- }
+-
+ return \%args, $action;
+ }
+
+ sub merge_args {
+ my ($self, $action, %args) = @_;
+- my %additive = (config => $self->{config},
+- install_path => $self->{properties}{install_path} ||= {});
+
+ $self->{action} = $action if defined $action;
+
+ # Extract our 'properties' from $cmd_args, the rest are put in 'args'.
+ while (my ($key, $val) = each %args) {
+- my $add_to = ($additive{$key} ? $additive{$key}
+- : $self->valid_property($key) ? $self->{properties}
+- : $self->{args});
+-
+- if ($additive{$key}) {
+- $add_to->{$_} = $val->{$_} foreach keys %$val;
+- } else {
+- $add_to->{$key} = $val;
++ if( $self->valid_property($key) ) {
++ my $method = "_set_property_$key";
++ $self->$method($val);
++ }
++ else {
++ $self->{args}->{$key} = $val;
+ }
+ }
+ }
+@@ -976,6 +984,40 @@
+ my $self = shift;
+ my ($args, $action) = $self->read_args(@_);
+ $self->merge_args($action, %$args);
++}
++
++## should only be called when parsing
++## command line arguments
++sub _set_property_config {
++ my $self = shift;
++ if(@_) {
++ my $val={};
++ if( @_ == 1 ) {
++ $val = $self->_parse_shared_args('config',shift);
++ }
++ else {
++ %$val = @_;
++ }
++ $self->{config}->{$_} = $val->{$_} foreach keys %$val;
++ }
++ return $self->{config};
++}
++
++## should only be called when parsing
++## command line arguments
++sub _set_property_install_path {
++ my $self = shift;
++ if(@_) {
++ my $val={};
++ if( @_ == 1 ) {
++ $val=$self->_parse_shared_args('install_path',shift);
++ }
++ else {
++ %$val = @_;
++ }
++ $self->{properties}{install_path}{$_} = $val->{$_} foreach keys %$val;
++ }
++ return $self->{properties}{install_path};
+ }
+
+ sub super_classes {
View
1,365 patches/plugin-patch
@@ -0,0 +1,1365 @@
+diff -urN Module-Build-orig/MANIFEST Module-Build/MANIFEST
+--- Module-Build-orig/MANIFEST 2003-11-28 14:54:50.000000000 -0500
++++ Module-Build/MANIFEST 2003-11-30 07:34:04.000000000 -0500
+@@ -1,54 +1,82 @@
+ Build.PL
+ Changes
+ INSTALL.txt
+-MANIFEST
+-META.yml
+-Makefile.PL
+-README
+ lib/Module/Build.pm
++lib/Module/Build/Action.pm
++lib/Module/Build/Action/Build.pm
++lib/Module/Build/Action/Clean.pm
++lib/Module/Build/Action/Code.pm
++lib/Module/Build/Action/Diff.pm
++lib/Module/Build/Action/Dist.pm
++lib/Module/Build/Action/DistCheck.pm
++lib/Module/Build/Action/DistClean.pm
++lib/Module/Build/Action/DistDir.pm
++lib/Module/Build/Action/DistMeta.pm
++lib/Module/Build/Action/DistSign.pm
++lib/Module/Build/Action/DistTest.pm
++lib/Module/Build/Action/Docs.pm
++lib/Module/Build/Action/FakeInstall.pm
++lib/Module/Build/Action/Help.pm
++lib/Module/Build/Action/Install.pm
++lib/Module/Build/Action/Manifest.pm
++lib/Module/Build/Action/PPD.pm
++lib/Module/Build/Action/RealClean.pm
++lib/Module/Build/Action/Skeleton.pm
++lib/Module/Build/Action/SkipCheck.pm
++lib/Module/Build/Action/Test.pm
++lib/Module/Build/Action/TestDB.pm
++lib/Module/Build/Action/VersionInstall.pm
+ lib/Module/Build/Base.pm
+ lib/Module/Build/Compat.pm
+ lib/Module/Build/Cookbook.pm
+-lib/Module/Build/PPMMaker.pm
++lib/Module/Build/Platform/aix.pm
+ lib/Module/Build/Platform/Amiga.pm
++lib/Module/Build/Platform/cygwin.pm
++lib/Module/Build/Platform/darwin.pm
+ lib/Module/Build/Platform/Default.pm
+ lib/Module/Build/Platform/EBCDIC.pm
+-lib/Module/Build/Platform/MPEiX.pm
+ lib/Module/Build/Platform/MacOS.pm
++lib/Module/Build/Platform/MPEiX.pm
++lib/Module/Build/Platform/os2.pm
+ lib/Module/Build/Platform/RiscOS.pm
+ lib/Module/Build/Platform/Unix.pm
+ lib/Module/Build/Platform/VMS.pm
+ lib/Module/Build/Platform/VOS.pm
+ lib/Module/Build/Platform/Windows.pm
+-lib/Module/Build/Platform/cygwin.pm
+-lib/Module/Build/Platform/darwin.pm
+-lib/Module/Build/Platform/aix.pm
++lib/Module/Build/PodParser.pm
++lib/Module/Build/PPMMaker.pm
++Makefile.PL
++MANIFEST
++META.yml
++README
++t/basic.t
++t/common.pl
++t/compat.t
++t/extend.t
++t/install.t
++t/lib/ModuleBuildOne.pm
+ t/MANIFEST
+-t/Sample/Build.PL
+-t/Sample/MANIFEST
+-t/Sample/META.yml
++t/manifypods.t
++t/notes.t
++t/runthrough.t
+ t/Sample/bin/sample.pl
++t/Sample/Build.PL
+ t/Sample/lib/Sample.pm
+ t/Sample/lib/Sample/Docs.pod
+ t/Sample/lib/Sample/NoPod.pm
++t/Sample/lib/Sample/Script
+ t/Sample/lib/Sample/Script.PL
++t/Sample/MANIFEST
++t/Sample/META.yml
+ t/Sample/script
+ t/Sample/test.pl
++t/signature.t
++t/versions.t
++t/xs.t
+ t/XSTest/Build.PL
+ t/XSTest/Changes
+-t/XSTest/MANIFEST
+ t/XSTest/lib/XSTest.pm
+ t/XSTest/lib/XSTest.xs
++t/XSTest/lib/XSTest_def.old
++t/XSTest/MANIFEST
+ t/XSTest/test.pl
+-t/basic.t
+-t/common.pl
+-t/compat.t
+-t/extend.t
+-t/install.t
+-t/lib/ModuleBuildOne.pm
+-t/manifypods.t
+-t/notes.t
+-t/runthrough.t
+-t/signature.t
+-t/versions.t
+-t/xs.t
+diff -urN Module-Build-orig/lib/Module/Build/Action/Build.pm Module-Build/lib/Module/Build/Action/Build.pm
+--- Module-Build-orig/lib/Module/Build/Action/Build.pm 1969-12-31 19:00:00.000000000 -0500
++++ Module-Build/lib/Module/Build/Action/Build.pm 2003-11-30 08:31:51.000000000 -0500
+@@ -0,0 +1,33 @@
++package Module::Build::Action::Build;
++
++use strict;
++use warnings;
++
++use vars qw(@ISA @DEPENDS_ON);
++@ISA = qw(Module::Build::Action);
++
++@DEPENDS_ON = qw(code docs);
++
++
++1;
++
++=head1 NAME
++
++Module::Build::Action::Build -
++
++=head1 DESCRIPTION
++
++If you run the C<Build> script without any arguments, it runs the
++C<build> action, which in turn runs the C<code> and C<docs> actions.
++
++This is analogous to the MakeMaker 'make all' target.
++
++=head1 AUTHOR
++
++Ken Williams, ken@mathforum.org
++
++=head1 SEE ALSO
++
++perl(1), Module::Build(3), ExtUtils::MakeMaker(3)
++
++=cut
+diff -urN Module-Build-orig/lib/Module/Build/Action/Clean.pm Module-Build/lib/Module/Build/Action/Clean.pm
+--- Module-Build-orig/lib/Module/Build/Action/Clean.pm 1969-12-31 19:00:00.000000000 -0500
++++ Module-Build/lib/Module/Build/Action/Clean.pm 2003-11-30 08:36:44.000000000 -0500
+@@ -0,0 +1,32 @@
++package Module::Build::Action::Clean;
++
++use strict;
++use warnings;
++
++use vars qw(@ISA @DEPENDS_ON);
++@ISA = qw(Module::Build::Action);
++
++@DEPENDS_ON = qw();
++
++
++1;
++
++=head1 NAME
++
++Module::Build::Action::Clean -
++
++=head1 DESCRIPTION
++
++This action will clean up any files that the build process may have
++created, including the C<blib/> directory (but not including the
++C<_build/> directory and the C<Build> script itself).
++
++=head1 AUTHOR
++
++Ken Williams, ken@mathforum.org
++
++=head1 SEE ALSO
++
++perl(1), Module::Build(3), ExtUtils::MakeMaker(3)
++
++=cut
+diff -urN Module-Build-orig/lib/Module/Build/Action/Code.pm Module-Build/lib/Module/Build/Action/Code.pm
+--- Module-Build-orig/lib/Module/Build/Action/Code.pm 1969-12-31 19:00:00.000000000 -0500
++++ Module-Build/lib/Module/Build/Action/Code.pm 2003-11-30 08:37:01.000000000 -0500
+@@ -0,0 +1,63 @@
++package Module::Build::Action::Code;
++
++use strict;
++use warnings;
++
++use vars qw(@ISA @DEPENDS_ON);
++@ISA = qw(Module::Build::Action);
++
++@DEPENDS_ON = qw();
++
++
++1;
++
++=head1 NAME
++
++Module::Build::Action::Code -
++
++=head1 DESCRIPTION
++
++This action builds your codebase.
++
++By default it just creates a C<blib/> directory and copies any C<.pm>
++and C<.pod> files from your C<lib/> directory into the C<blib/>
++directory. It also compiles any C<.xs> files from C<lib/> and places
++them in C<blib/>. Of course, you need a working C compiler
++(probably the same one that built perl itself) for this to work
++properly.
++
++The C<build> action also runs any C<.PL> files in your F<lib/>
++directory. Typically these create other files, named the same but
++without the C<.PL> ending. For example, a file F<lib/Foo/Bar.pm.PL>
++could create the file F<lib/Foo/Bar.pm>. The C<.PL> files are
++processed first, so any C<.pm> files (or other kinds that we deal
++with) will get copied correctly.
++
++If your C<.PL> scripts don't create any files, or if they create files
++with unexpected names, or even if they create multiple files, you
++should tell us that so that we can clean up properly after these
++created files. Use the C<PL_files> parameter to C<new()>:
++
++ PL_files => { 'lib/Foo/Bar_pm.PL' => 'lib/Foo/Bar.pm',
++ 'lib/something.PL' => ['/lib/something', '/lib/else'],
++ 'lib/funny.PL' => [] }
++
++Note that in contrast to MakeMaker, the C<build> action only
++(currently) handles C<.pm>, C<.pod>, C<.PL>, and C<.xs> files. They
++must all be in the C<lib/> directory, in the directory structure that
++they should have when installed. We also handle C<.c> files that can
++be in the place of your choosing - see the C<c_source> argument to
++C<new()>.
++
++The C<.xs> support is currently in alpha. Please let me know whether
++it works for you.
++
++=head1 AUTHOR
++
++Ken Williams, ken@mathforum.org
++
++=head1 SEE ALSO
++
++perl(1), Module::Build(3), ExtUtils::MakeMaker(3)
++
++=cut
+diff -urN Module-Build-orig/lib/Module/Build/Action/Diff.pm Module-Build/lib/Module/Build/Action/Diff.pm
+--- Module-Build-orig/lib/Module/Build/Action/Diff.pm 1969-12-31 19:00:00.000000000 -0500
++++ Module-Build/lib/Module/Build/Action/Diff.pm 2003-11-30 08:36:32.000000000 -0500
+@@ -0,0 +1,40 @@
++package Module::Build::Action::Diff;
++
++use strict;
++use warnings;
++
++use vars qw(@ISA @DEPENDS_ON);
++@ISA = qw(Module::Build::Action);
++
++@DEPENDS_ON = qw(build);
++
++
++1;
++
++=head1 NAME
++
++Module::Build::Action::Diff -
++
++=head1 DESCRIPTION
++
++This action will compare the files about to be installed with their
++installed counterparts. For .pm and .pod files, a diff will be shown
++(this currently requires a 'diff' program to be in your PATH). For
++other files like compiled binary files, we simply report whether they
++differ.
++
++A C<flags> parameter may be passed to the action, which will be passed
++to the 'diff' program. Consult your 'diff' documentation for the
++parameters it will accept - a good one is C<-u>:
++
++ ./Build diff flags=-u
++
++=head1 AUTHOR
++
++Ken Williams, ken@mathforum.org
++
++=head1 SEE ALSO
++
++perl(1), Module::Build(3), ExtUtils::MakeMaker(3)
++
++=cut
+diff -urN Module-Build-orig/lib/Module/Build/Action/Dist.pm Module-Build/lib/Module/Build/Action/Dist.pm
+--- Module-Build-orig/lib/Module/Build/Action/Dist.pm 1969-12-31 19:00:00.000000000 -0500
++++ Module-Build/lib/Module/Build/Action/Dist.pm 2003-11-30 08:36:05.000000000 -0500
+@@ -0,0 +1,33 @@
++package Module::Build::Action::Dist;
++
++use strict;
++use warnings;
++
++use vars qw(@ISA @DEPENDS_ON);
++@ISA = qw(Module::Build::Action);
++
++@DEPENDS_ON = qw(distdir);
++
++
++1;
++
++=head1 NAME
++
++Module::Build::Action::Dist -
++
++=head1 DESCRIPTION
++
++This action is helpful for module authors who want to package up their
++module for distribution through a medium like CPAN. It will create a
++tarball of the files listed in F<MANIFEST> and compress the tarball using
++GZIP compression.
++
++=head1 AUTHOR
++
++Ken Williams, ken@mathforum.org
++
++=head1 SEE ALSO
++
++perl(1), Module::Build(3), ExtUtils::MakeMaker(3)
++
++=cut
+diff -urN Module-Build-orig/lib/Module/Build/Action/DistCheck.pm Module-Build/lib/Module/Build/Action/DistCheck.pm
+--- Module-Build-orig/lib/Module/Build/Action/DistCheck.pm 1969-12-31 19:00:00.000000000 -0500
++++ Module-Build/lib/Module/Build/Action/DistCheck.pm 2003-11-30 08:35:43.000000000 -0500
+@@ -0,0 +1,31 @@
++package Module::Build::Action::DistCheck;
++
++use strict;
++use warnings;
++
++use vars qw(@ISA @DEPENDS_ON);
++@ISA = qw(Module::Build::Action);
++
++@DEPENDS_ON = qw();
++
++
++1;
++
++=head1 NAME
++
++Module::Build::Action::DistCheck -
++
++=head1 DESCRIPTION
++
++Reports which files are in the build directory but not in the
++F<MANIFEST> file, and vice versa. (See L<manifest> for details)
++
++=head1 AUTHOR
++
++Ken Williams, ken@mathforum.org
++
++=head1 SEE ALSO
++
++perl(1), Module::Build(3), ExtUtils::MakeMaker(3)
++
++=cut
+diff -urN Module-Build-orig/lib/Module/Build/Action/DistClean.pm Module-Build/lib/Module/Build/Action/DistClean.pm
+--- Module-Build-orig/lib/Module/Build/Action/DistClean.pm 1969-12-31 19:00:00.000000000 -0500
++++ Module-Build/lib/Module/Build/Action/DistClean.pm 2003-11-30 08:35:33.000000000 -0500
+@@ -0,0 +1,30 @@
++package Module::Build::Action::DistClean;
++
++use strict;
++use warnings;
++
++use vars qw(@ISA @DEPENDS_ON);
++@ISA = qw(Module::Build::Action);
++
++@DEPENDS_ON = qw(realclean distcheck);
++
++
++1;
++
++=head1 NAME
++
++Module::Build::Action::DistClean -
++
++=head1 DESCRIPTION
++
++Performs the 'realclean' action and then the 'distcheck' action.
++
++=head1 AUTHOR
++
++Ken Williams, ken@mathforum.org
++
++=head1 SEE ALSO
++
++perl(1), Module::Build(3), ExtUtils::MakeMaker(3)
++
++=cut
+diff -urN Module-Build-orig/lib/Module/Build/Action/DistDir.pm Module-Build/lib/Module/Build/Action/DistDir.pm
+--- Module-Build-orig/lib/Module/Build/Action/DistDir.pm 1969-12-31 19:00:00.000000000 -0500
++++ Module-Build/lib/Module/Build/Action/DistDir.pm 2003-11-30 08:35:28.000000000 -0500
+@@ -0,0 +1,42 @@
++package Module::Build::Action::DistDir;
++
++use strict;
++use warnings;
++
++use vars qw(@ISA @DEPENDS_ON);
++@ISA = qw(Module::Build::Action);
++
++@DEPENDS_ON = qw(distmeta);
++
++
++1;
++
++=head1 NAME
++
++Module::Build::Action::DistDir -
++
++=head1 DESCRIPTION
++
++Creates a directory called C<$(DISTNAME)-$(VERSION)> (if that
++directory already exists, it will be removed first). Then copies all
++the files listed in the F<MANIFEST> file to that directory. This
++directory is what people will see when they download your distribution
++and unpack it.
++
++While performing the 'distdir' action, a file containing various bits
++of "metadata" will be created. The metadata includes the module's
++name, version, dependencies, license, and the C<dynamic_config>
++flag. This file is created as F<META.yml> in YAML format, so you
++must have the C<YAML> module installed in order to create it. You
++should also ensure that the F<META.yml> file is listed in your
++F<MANIFEST> - if it's not, a warning will be issued.
++
++=head1 AUTHOR
++
++Ken Williams, ken@mathforum.org
++
++=head1 SEE ALSO
++
++perl(1), Module::Build(3), ExtUtils::MakeMaker(3)
++
++=cut
+diff -urN Module-Build-orig/lib/Module/Build/Action/DistMeta.pm Module-Build/lib/Module/Build/Action/DistMeta.pm
+--- Module-Build-orig/lib/Module/Build/Action/DistMeta.pm 1969-12-31 19:00:00.000000000 -0500
++++ Module-Build/lib/Module/Build/Action/DistMeta.pm 2003-11-30 08:35:47.000000000 -0500
+@@ -0,0 +1,30 @@
++package Module::Build::Action::DistMeta;
++
++use strict;
++use warnings;
++
++use vars qw(@ISA @DEPENDS_ON);
++@ISA = qw(Module::Build::Action);
++
++@DEPENDS_ON = qw();
++
++
++1;
++
++=head1 NAME
++
++Module::Build::Action::DistMeta -
++
++=head1 DESCRIPTION
++
++Creates the F<META.yml> file for your distribution.
++
++=head1 AUTHOR
++
++Ken Williams, ken@mathforum.org
++
++=head1 SEE ALSO
++
++perl(1), Module::Build(3), ExtUtils::MakeMaker(3)
++
++=cut
+diff -urN Module-Build-orig/lib/Module/Build/Action/DistSign.pm Module-Build/lib/Module/Build/Action/DistSign.pm
+--- Module-Build-orig/lib/Module/Build/Action/DistSign.pm 1969-12-31 19:00:00.000000000 -0500
++++ Module-Build/lib/Module/Build/Action/DistSign.pm 2003-11-30 08:35:52.000000000 -0500
+@@ -0,0 +1,32 @@
++package Module::Build::Action::DistSign;
++
++use strict;
++use warnings;
++
++use vars qw(@ISA @DEPENDS_ON);
++@ISA = qw(Module::Build::Action);
++
++@DEPENDS_ON = qw(DistDir);
++
++
++1;
++
++=head1 NAME
++
++Module::Build::Action::DistSign -
++
++=head1 DESCRIPTION
++
++Uses C<Module::Signature> to create a SIGNATURE file for your
++distribution, and adds the SIGNATURE file to the distribution's
++MANIFEST.
++
++=head1 AUTHOR
++
++Ken Williams, ken@mathforum.org
++
++=head1 SEE ALSO
++
++perl(1), Module::Build(3), ExtUtils::MakeMaker(3)
++
++=cut
+diff -urN Module-Build-orig/lib/Module/Build/Action/DistTest.pm Module-Build/lib/Module/Build/Action/DistTest.pm
+--- Module-Build-orig/lib/Module/Build/Action/DistTest.pm 1969-12-31 19:00:00.000000000 -0500
++++ Module-Build/lib/Module/Build/Action/DistTest.pm 2003-11-30 08:35:20.000000000 -0500
+@@ -0,0 +1,32 @@
++package Module::Build::Action::DistTest;
++
++use strict;
++use warnings;
++
++use vars qw(@ISA @DEPENDS_ON);
++@ISA = qw(Module::Build::Action);
++
++@DEPENDS_ON = qw(distdir);
++
++
++1;
++
++=head1 NAME
++
++Module::Build::Action::DistTest -
++
++=head1 DESCRIPTION
++
++Performs the 'distdir' action, then switches into that directory and
++runs a C<perl Build.PL>, followed by the 'build' and 'test' actions in
++that directory.
++
++=head1 AUTHOR
++
++Ken Williams, ken@mathforum.org
++
++=head1 SEE ALSO
++
++perl(1), Module::Build(3), ExtUtils::MakeMaker(3)
++
++=cut
+diff -urN Module-Build-orig/lib/Module/Build/Action/Docs.pm Module-Build/lib/Module/Build/Action/Docs.pm
+--- Module-Build-orig/lib/Module/Build/Action/Docs.pm 1969-12-31 19:00:00.000000000 -0500
++++ Module-Build/lib/Module/Build/Action/Docs.pm 2003-11-30 08:36:54.000000000 -0500
+@@ -0,0 +1,33 @@
++package Module::Build::Action::Docs;
++
++use strict;
++use warnings;
++
++use vars qw(@ISA @DEPENDS_ON);
++@ISA = qw(Module::Build::Action);
++
++@DEPENDS_ON = qw(code);
++
++
++1;
++
++=head1 NAME
++
++Module::Build::Action::Docs -
++
++=head1 DESCRIPTION
++
++This will generate documentation (ie: Unix man pages) for any binary and
++library files under B<blib/> that contain POD. If there are no C<bindoc> or
++C<libdoc> installation targets defined (as will be the case on systems that
++don't support Unix manpages) this action does nothing.
++
++=head1 AUTHOR
++
++Ken Williams, ken@mathforum.org
++
++=head1 SEE ALSO
++
++perl(1), Module::Build(3), ExtUtils::MakeMaker(3)
++
++=cut
+diff -urN Module-Build-orig/lib/Module/Build/Action/FakeInstall.pm Module-Build/lib/Module/Build/Action/FakeInstall.pm
+--- Module-Build-orig/lib/Module/Build/Action/FakeInstall.pm 1969-12-31 19:00:00.000000000 -0500
++++ Module-Build/lib/Module/Build/Action/FakeInstall.pm 2003-11-30 08:36:23.000000000 -0500
+@@ -0,0 +1,32 @@
++package Module::Build::Action::FakeInstall;
++
++use strict;
++use warnings;
++
++use vars qw(@ISA @DEPENDS_ON);
++@ISA = qw(Module::Build::Action);
++
++@DEPENDS_ON = qw(build);
++
++
++1;
++
++=head1 NAME
++
++Module::Build::Action::FakeInstall -
++
++=head1 DESCRIPTION
++
++This is just like the C<install> action, but it won't actually do
++anything, it will just report what it I<would> have done if you had
++actually run the C<install> action.
++
++=head1 AUTHOR
++
++Ken Williams, ken@mathforum.org
++
++=head1 SEE ALSO
++
++perl(1), Module::Build(3), ExtUtils::MakeMaker(3)
++
++=cut
+diff -urN Module-Build-orig/lib/Module/Build/Action/Help.pm Module-Build/lib/Module/Build/Action/Help.pm
+--- Module-Build-orig/lib/Module/Build/Action/Help.pm 1969-12-31 19:00:00.000000000 -0500
++++ Module-Build/lib/Module/Build/Action/Help.pm 2003-11-30 08:34:12.000000000 -0500
+@@ -0,0 +1,87 @@
++package Module::Build::Action::Help;
++
++use strict;
++use warnings;
++
++use vars qw(@ISA @DEPENDS_ON);
++@ISA = qw(Module::Build::Action);
++
++@DEPENDS_ON = qw();
++
++sub _get_action_docs {
++ my ($self, $action) = @_;
++ my %plugins = Module::Build::Action::plugins();
++
++ my $file = $plugins{$action}{file};
++ my $fh = IO::File->new("< $file") or
++ die "Can't read documentation for '$action': $!";
++
++ # Skip to DESCRIPTION
++ local $_;
++ while (<$fh>) {
++ last if /^=head1 DESCRIPTION/;
++ }
++
++ # Return everything up to the next section
++ my @docs = ();
++ while (<$fh>) {
++ last if /^=(:?head|cut)/;
++ push @docs, $_;
++ }
++
++ return @docs;
++}
++
++sub execute {
++ my ($self, $action) = (@_, '');
++ my @actions = Module::Build::Action::actions();
++
++ if (grep {$action eq $_} @actions) {
++ print $self->_get_action_docs($action);
++ return;
++ }
++
++ print <<EOF;
++
++ Usage: $0 <action> arg1=value arg2=value ...
++ Example: $0 test verbose=1
++
++ Actions defined:
++EOF
++
++ # Flow down columns, not across rows
++ @actions = map $actions[($_ + ($_ % 2) * @actions) / 2], 0..$#actions;
++
++ while (my ($one, $two) = splice @actions, 0, 2) {
++ printf(" %-12s %-12s\n", $one, $two||'');
++ }
++
++ print "\nRun `Build help <action>` for details on an individual action.\n";
++ print "See `perldoc Module::Build` for complete documentation.\n";
++}
++
++1;
++
++=head1 NAME
++
++Module::Build::Action::Help -
++
++=head1 DESCRIPTION
++
++This action will simply print out a message that is meant to help you
++use the build process. It will show you a list of available build
++actions too.
++
++With an optional argument specifying an action name (e.g. C<Build help
++test>), the 'help' action will show you any POD documentation it can
++find for that action.
++
++=head1 AUTHOR
++
++Ken Williams, ken@mathforum.org
++
++=head1 SEE ALSO
++
++perl(1), Module::Build(3), ExtUtils::MakeMaker(3)
++
++=cut
+diff -urN Module-Build-orig/lib/Module/Build/Action/Install.pm Module-Build/lib/Module/Build/Action/Install.pm
+--- Module-Build-orig/lib/Module/Build/Action/Install.pm 1969-12-31 19:00:00.000000000 -0500
++++ Module-Build/lib/Module/Build/Action/Install.pm 2003-11-30 08:32:45.000000000 -0500
+@@ -0,0 +1,44 @@
++package Module::Build::Action::Install;
++
++use strict;
++use warnings;
++
++use vars qw(@ISA @DEPENDS_ON);
++@ISA = qw(Module::Build::Action);
++
++@DEPENDS_ON = qw(build);
++
++
++1;
++
++=head1 NAME
++
++Module::Build::Action::Install -
++
++=head1 DESCRIPTION
++
++This action will use C<ExtUtils::Install> to install the files from
++C<blib/> into the system. See L<How Installation Paths are Determined> for details
++about how Module::Build determines where to install things, and how to
++influence this process.
++
++If you want the installation process to look around in C<@INC> for
++other versions of the stuff you're installing and try to delete it,
++you can use the C<uninst> parameter, which tells C<ExtUtils::Install> to
++do so:
++
++ Build install uninst=1
++
++This can be a good idea, as it helps prevent multiple versions of a
++module from being present on your system, which can be a confusing
++situation indeed.
++
++=head1 AUTHOR
++
++Ken Williams, ken@mathforum.org
++
++=head1 SEE ALSO
++
++perl(1), Module::Build(3), ExtUtils::MakeMaker(3)
++
++=cut
+diff -urN Module-Build-orig/lib/Module/Build/Action/Manifest.pm Module-Build/lib/Module/Build/Action/Manifest.pm
+--- Module-Build-orig/lib/Module/Build/Action/Manifest.pm 1969-12-31 19:00:00.000000000 -0500
++++ Module-Build/lib/Module/Build/Action/Manifest.pm 2003-11-30 08:36:11.000000000 -0500
+@@ -0,0 +1,56 @@
++package Module::Build::Action::Manifest;
++
++use strict;
++use warnings;
++
++use vars qw(@ISA @DEPENDS_ON);
++@ISA = qw(Module::Build::Action);
++
++@DEPENDS_ON = qw();
++
++sub execute {
++ require ExtUtils::Manifest; # ExtUtils::Manifest is not warnings clean.
++ local ($^W, $ExtUtils::Manifest::Quiet) = (0,1);
++ ExtUtils::Manifest::mkmanifest();
++}
++
++1;
++
++=head1 NAME
++
++Module::Build::Action::Manifest -
++
++=head1 DESCRIPTION
++
++This is an action intended for use by module authors, not people
++installing modules. It will bring the F<MANIFEST> up to date with the
++files currently present in the distribution. You may use a
++F<MANIFEST.SKIP> file to exclude certain files or directories from
++inclusion in the F<MANIFEST>. F<MANIFEST.SKIP> should contain a bunch
++of regular expressions, one per line. If a file in the distribution
++directory matches any of the regular expressions, it won't be included
++in the F<MANIFEST>.
++
++The following is a reasonable F<MANIFEST.SKIP> starting point, you can
++add your own stuff to it:
++
++ ^_build
++ ^Build$
++ ^blib
++ ~$
++ \.bak$
++ ^MANIFEST\.SKIP$
++ CVS
++
++See the L<distcheck> and L<skipcheck> actions if you want to find out
++what the C<manifest> action would do, without actually doing anything.
++
++=head1 AUTHOR
++
++Ken Williams, ken@mathforum.org
++
++=head1 SEE ALSO
++
++perl(1), Module::Build(3), ExtUtils::MakeMaker(3)
++
++=cut
+diff -urN Module-Build-orig/lib/Module/Build/Action/PPD.pm Module-Build/lib/Module/Build/Action/PPD.pm
+--- Module-Build-orig/lib/Module/Build/Action/PPD.pm 1969-12-31 19:00:00.000000000 -0500
++++ Module-Build/lib/Module/Build/Action/PPD.pm 2003-11-30 08:35:14.000000000 -0500
+@@ -0,0 +1,30 @@
++package Module::Build::Action::PPD;
++
++use strict;
++use warnings;
++
++use vars qw(@ISA @DEPENDS_ON);
++@ISA = qw(Module::Build::Action);
++
++@DEPENDS_ON = qw();
++
++
++1;
++
++=head1 NAME
++
++Module::Build::Action::PPD -
++
++=head1 DESCRIPTION
++
++Build a PPD file for your distribution.
++
++=head1 AUTHOR
++
++Ken Williams, ken@mathforum.org
++
++=head1 SEE ALSO
++
++perl(1), Module::Build(3), ExtUtils::MakeMaker(3)
++
++=cut
+diff -urN Module-Build-orig/lib/Module/Build/Action/RealClean.pm Module-Build/lib/Module/Build/Action/RealClean.pm
+--- Module-Build-orig/lib/Module/Build/Action/RealClean.pm 1969-12-31 19:00:00.000000000 -0500
++++ Module-Build/lib/Module/Build/Action/RealClean.pm 2003-11-30 08:36:39.000000000 -0500
+@@ -0,0 +1,33 @@
++package Module::Build::Action::RealClean;
++
++use strict;
++use warnings;
++
++use vars qw(@ISA @DEPENDS_ON);
++@ISA = qw(Module::Build::Action);
++
++@DEPENDS_ON = qw();
++
++
++1;
++
++=head1 NAME
++
++Module::Build::Action::RealClean -
++
++=head1 DESCRIPTION
++
++This action is just like the C<clean> action, but also removes the
++C<_build> directory and the C<Build> script. If you run the
++C<realclean> action, you are essentially starting over, so you will
++have to re-create the C<Build> script again.
++
++=head1 AUTHOR
++
++Ken Williams, ken@mathforum.org
++
++=head1 SEE ALSO
++
++perl(1), Module::Build(3), ExtUtils::MakeMaker(3)
++
++=cut
+diff -urN Module-Build-orig/lib/Module/Build/Action/Skeleton.pm Module-Build/lib/Module/Build/Action/Skeleton.pm
+--- Module-Build-orig/lib/Module/Build/Action/Skeleton.pm 1969-12-31 19:00:00.000000000 -0500
++++ Module-Build/lib/Module/Build/Action/Skeleton.pm 2003-11-30 08:32:23.000000000 -0500
+@@ -0,0 +1,36 @@
++package Module::Build::Action::Skeleton;
++
++use strict;
++use warnings;
++
++use vars qw(@ISA @DEPENDS_ON);
++@ISA = qw(Module::Build::Action);
++
++@DEPENDS_ON = qw();
++
++
++1;
++
++=head1 NAME
++
++Module::Build::Action::Skeleton - Skeleton action plugin.
++
++=head1 DESCRIPTION
++
++This module implements the 'XXX' action for Module::Build.
++
++This is a template module to use for constructing custom actions for
++Module::Build. Copy this file and edit to create your own custom
++action.
++
++Please see the L<Module::Build::Action> for help creating plugins.
++
++=head1 AUTHOR
++
++Ken Williams, ken@mathforum.org
++
++=head1 SEE ALSO
++
++perl(1), Module::Build(3), ExtUtils::MakeMaker(3)
++
++=cut
+diff -urN Module-Build-orig/lib/Module/Build/Action/SkipCheck.pm Module-Build/lib/Module/Build/Action/SkipCheck.pm
+--- Module-Build-orig/lib/Module/Build/Action/SkipCheck.pm 1969-12-31 19:00:00.000000000 -0500
++++ Module-Build/lib/Module/Build/Action/SkipCheck.pm 2003-11-30 08:35:38.000000000 -0500
+@@ -0,0 +1,31 @@
++package Module::Build::Action::SkipCheck;
++
++use strict;
++use warnings;
++
++use vars qw(@ISA @DEPENDS_ON);
++@ISA = qw(Module::Build::Action);
++
++@DEPENDS_ON = qw();
++
++
++1;
++
++=head1 NAME
++
++Module::Build::Action::SkipCheck -
++
++=head1 DESCRIPTION
++
++Reports which files are skipped due to the entries in the
++F<MANIFEST.SKIP> file (See L<manifest> for details)
++
++=head1 AUTHOR
++
++Ken Williams, ken@mathforum.org
++
++=head1 SEE ALSO
++
++perl(1), Module::Build(3), ExtUtils::MakeMaker(3)
++
++=cut
+diff -urN Module-Build-orig/lib/Module/Build/Action/Test.pm Module-Build/lib/Module/Build/Action/Test.pm
+--- Module-Build-orig/lib/Module/Build/Action/Test.pm 1969-12-31 19:00:00.000000000 -0500
++++ Module-Build/lib/Module/Build/Action/Test.pm 2003-11-30 08:32:36.000000000 -0500
+@@ -0,0 +1,58 @@
++package Module::Build::Action::Test;
++
++use strict;
++use warnings;
++
++use vars qw(@ISA @DEPENDS_ON);
++@ISA = qw(Module::Build::Action);
++
++@DEPENDS_ON = qw(code);
++
++1;
++
++=head1 NAME
++
++Module::Build::Action::Test - Runs the test suite for this module.
++
++=head1 DESCRIPTION
++
++This will use C<Test::Harness> to run any regression tests and report
++their results. Tests can be defined in the standard places: a file
++called C<test.pl> in the top-level directory, or several files ending
++with C<.t> in a C<t/> directory.
++
++If you want tests to be 'verbose', i.e. show details of test execution
++rather than just summary information, pass the argument C<verbose=1>.
++
++If you want to run tests under the perl debugger, pass the argument
++C<debugger=1>.
++
++In addition, if a file called C<visual.pl> exists in the top-level
++directory, this file will be executed as a Perl script and its output
++will be shown to the user. This is a good place to put speed tests or
++other tests that don't use the C<Test::Harness> format for output.
++
++To override the choice of tests to run, you may pass a C<test_files>
++argument whose value is a whitespace-separated list of test scripts to
++run. This is especially useful in development, when you only want to
++run a single test to see whether you've squashed a certain bug yet:
++
++ ./Build test --test_files t/something_failing.t
++
++You may also pass several C<test_files> arguments separately:
++
++ ./Build test --test_files t/one.t --test_files t/two.t
++
++or use a C<glob()>-style pattern:
++
++ ./Build test --test_files 't/01-*.t'
++
++=head1 AUTHOR
++
++Ken Williams, ken@mathforum.org
++
++=head1 SEE ALSO
++
++perl(1), Module::Build(3), ExtUtils::MakeMaker(3)
++
++=cut
+diff -urN Module-Build-orig/lib/Module/Build/Action/TestDB.pm Module-Build/lib/Module/Build/Action/TestDB.pm
+--- Module-Build-orig/lib/Module/Build/Action/TestDB.pm 1969-12-31 19:00:00.000000000 -0500
++++ Module-Build/lib/Module/Build/Action/TestDB.pm 2003-11-30 08:36:49.000000000 -0500
+@@ -0,0 +1,31 @@
++package Module::Build::Action::TestDB;
++
++use strict;
++use warnings;
++
++use vars qw(@ISA @DEPENDS_ON);
++@ISA = qw(Module::Build::Action);
++
++@DEPENDS_ON = qw(test);
++
++
++1;
++
++=head1 NAME
++
++Module::Build::Action::TestDB - Debug failing tests.
++
++=head1 DESCRIPTION
++
++This is a synonym for the 'test' action with the C<debugger=1>
++argument.
++
++=head1 AUTHOR
++
++Ken Williams, ken@mathforum.org
++
++=head1 SEE ALSO
++
++perl(1), Module::Build(3), ExtUtils::MakeMaker(3)
++
++=cut
+diff -urN Module-Build-orig/lib/Module/Build/Action/VersionInstall.pm Module-Build/lib/Module/Build/Action/VersionInstall.pm
+--- Module-Build-orig/lib/Module/Build/Action/VersionInstall.pm 1969-12-31 19:00:00.000000000 -0500
++++ Module-Build/lib/Module/Build/Action/VersionInstall.pm 2003-11-30 08:36:18.000000000 -0500
+@@ -0,0 +1,52 @@
++package Module::Build::Action::VersionInstall;
++
++use strict;
++use warnings;
++
++use vars qw(@ISA @DEPENDS_ON);
++@ISA = qw(Module::Build::Action);
++
++@DEPENDS_ON = qw();
++
++
++1;
++
++=head1 NAME
++
++Module::Build::Action::VersionInstall -
++
++=head1 DESCRIPTION
++
++** Note: since C<only.pm> is so new, and since we just recently added
++support for it here too, this feature is to be considered
++experimental. **
++
++If you have the C<only.pm> module installed on your system, you can
++use this action to install a module into the version-specific library
++trees. This means that you can have several versions of the same
++module installed and C<use> a specific one like this:
++
++ use only MyModule => 0.55;
++
++To override the default installation libraries in C<only::config>,
++specify the C<versionlib> parameter when you run the C<Build.PL> script:
++
++ perl Build.PL versionlib=/my/version/place/
++
++To override which version the module is installed as, specify the
++C<versionlib> parameter when you run the C<Build.PL> script:
++
++ perl Build.PL version=0.50
++
++See the C<only.pm> documentation for more information on
++version-specific installs.
++
++=head1 AUTHOR
++
++Ken Williams, ken@mathforum.org
++
++=head1 SEE ALSO
++
++perl(1), Module::Build(3), ExtUtils::MakeMaker(3)
++
++=cut
+diff -urN Module-Build-orig/lib/Module/Build/Action.pm Module-Build/lib/Module/Build/Action.pm
+--- Module-Build-orig/lib/Module/Build/Action.pm 1969-12-31 19:00:00.000000000 -0500
++++ Module-Build/lib/Module/Build/Action.pm 2003-11-30 08:18:50.000000000 -0500
+@@ -0,0 +1,205 @@
++package Module::Build::Action;
++
++use strict;
++use warnings;
++
++my $verbose = 1; # should carry over from Module::Build.
++
++{ # Scan plugins
++ my (%PLUGINS, %DEPENDENCIES);
++
++ my @dirstack;
++
++ sub scan_plugins {
++ my $dir = shift;
++ return unless -d $dir;
++
++ my @subdirs;
++
++ opendir DIR, $dir or die "Can't open directory ($dir): $!\n";
++ while (my $file = readdir DIR) {
++ next if $file eq File::Spec->curdir()
++ or $file eq File::Spec->updir();
++
++ my $path = File::Spec->catfile($dir, $file);
++ if (-d $path) {
++ push @subdirs, $file;
++ next;
++ } elsif ($file =~ /\.pm$/) {
++ (my $action = $file) =~ s/\.pm$//;
++ next if $action eq 'Skeleton'; # useless template file
++
++ # Try to load
++ my $package = join '::', qw(Module Build Action), @dirstack, $action;
++ eval "require $package";
++ next if $@;
++
++ # Check if it has plugin interface
++ if ($package->can('register_plugin')) {
++ my $action = $package->register_plugin();
++
++ # Check for overrides.
++ if ($PLUGINS{"x$action"} && $PLUGINS{"x$action"}{package} ne $package) {
++ if ($verbose) {
++ print "Action '$action' from '" . $PLUGINS{"x$action"}{package} . "'\n";
++ print " replaced by '$package'\n";
++ }
++ delete $PLUGINS{"x$action"};
++ no strict 'refs';
++ undef *{"Module::Build::Base::ACTION_x$action"};
++ } elsif ($PLUGINS{"x$action"}) {
++ next; # already registered.
++ }
++
++ $PLUGINS{"x$action"} = {
++ package => $package,
++ file => $path,
++ ref => $package->new(),
++ };
++
++ # Backpatable Dispatching
++ no strict 'refs';
++ *{"Module::Build::Base::ACTION_x$action"} =
++ sub { $package->execute() };
++ }
++ }
++ }
++ closedir DIR;
++
++ foreach my $subdir (@subdirs) {
++ push @dirstack, $subdir;
++ scan_plugins(File::Spec->catdir($dir, $subdir));
++ pop @dirstack;
++ }
++ }
++
++ foreach my $dir (@INC) {
++ scan_plugins(File::Spec->catdir($dir, qw(Module Build Action)));
++ }
++
++
++ ##### Access plugin data #####
++
++ sub actions { return sort keys %PLUGINS }
++
++ sub plugins { return %PLUGINS } # XXX Naughty ???
++
++ sub dispatch {
++ my ($action, @argv) = @_;
++
++ my $plugin = $PLUGINS{$action}{ref};
++
++ if ($plugin->can('preprocess_argv')) {
++ @argv = $plugin->preprocess_argv(@argv);
++ }
++
++ _rdispatch($action, @argv);
++ }
++
++ sub _rdispatch { # recursive dispatch
++ my ($action, @argv) = @_;
++
++ my $plugin = $PLUGINS{$action}{ref};
++ foreach my $dep ($plugin->dependencies()) {
++ _rdispatch("x$dep", @argv);
++ }
++
++ return $plugin->execute(@argv)
++ }
++}
++
++
++############################################################
++
++sub new {
++ my $class = ref($_[0]) ? ref(shift) : shift;
++
++ my @deps;
++ { no strict 'refs';
++ @deps = eval { @{"${class}::DEPENDS_ON"} };
++ } @deps = @deps or ();
++
++ return bless {
++ _dependencies => \@deps,
++ }, $class;
++}
++
++sub register_plugin {
++ my $self = shift;
++ (my $name = $self) =~ s/^Module::Build::Action:://;
++ return lc($name);
++}
++
++sub dependencies {
++ my $self = shift;
++ return @{ $self->{_dependencies} };
++}
++
++sub execute { # perform this action
++ my $class = ref $_[0] ? ref shift : shift;
++ print "executing $class\n";
++}
++
++sub up_to_date { # does an action know if it's up to date ?
++}
++
++sub cleanup { # does an action know how to cleanup ?
++}
++
++
++1;
++
++=head1 NAME
++
++Module::Build::Action - Base class for managing plugin actions.
++
++=head1 DESCRIPTION
++
++This module serves two purposes: 1) to be a base class for action
++plugins to inherit from, and 2) to provide methods for managing
++actions and their dependencies, and for dispatching actions.
++
++Hmm, maybe this should be two different classes.
++
++=head1 CREATING PLUGINS
++
++The easiest way to create a plugin is to copy
++Module::Build::Action::Skeleton and edit it:
++
++=over 4
++
++=item *
++
++Rename the package name to the name you wish for your plugin; this is
++usually the name of the action in title caps.
++
++=item *
++
++If the action name is different from the name given to your package,
++you must override the C<register_plugin()> method to return the action
++name.
++
++=item *
++
++Provide an execute method that performs the action.
++
++=item *
++
++Optionally, provide a C<preprocess_argv()> method if you need to
++handle the arguments before any dependencies are run.
++
++=item *
++
++Document your action.
++
++=back
++
++=head1 AUTHOR
++
++Ken Williams, ken@mathforum.org
++
++=head1 SEE ALSO
++
++perl(1), Module::Build(3), ExtUtils::MakeMaker(3)
++
++=cut
+diff -urN Module-Build-orig/lib/Module/Build/Base.pm Module-Build/lib/Module/Build/Base.pm
+--- Module-Build-orig/lib/Module/Build/Base.pm 2003-11-28 16:40:55.000000000 -0500
++++ Module-Build/lib/Module/Build/Base.pm 2003-11-30 08:12:46.000000000 -0500
+@@ -12,6 +12,8 @@
+ use Data::Dumper ();
+ use IO::File ();
+
++use Module::Build::Action;
++
+ #################### Constructors ###########################
+ sub new {
+ my $self = shift()->_construct(@_);
+@@ -813,9 +815,17 @@
+ my ($self, $action) = @_;
+ return if $self->{_completed_actions}{$action}++;
+ local $self->{action} = $action;
++
++ my @actions = Module::Build::Action::actions();
++ if (grep {$action eq $_} @actions) {
++ return Module::Build::Action::dispatch(
++ $action, @{$self->{args}{ARGV}});
++ }
++
+ my $method = "ACTION_$action";
+- die "No action '$action' defined, try running the 'help' action.\n" unless $self->can($method);
+- return $self->$method();
++ return $self->$method() if ($self->can($method));
++
++ die "No action '$action' defined, try running the 'help' action.\n";
+ }
+
+ sub _cull_arg {
View
10 patches/version.patch
@@ -0,0 +1,10 @@
+--- lib/Module/Build/Base.pm 2004-02-25 13:57:59.000000000 -0800
++++ lib/Module/Build/Base.pm 2004-03-18 17:19:26.000000000 -0800
+@@ -477,6 +477,7 @@
+ my $match = qr/([\$*])(([\w\:\']*)\bVERSION)\b.*\=/;
+ my ($v_line, $sigil, $var) = $self->_next_code_line($fh, $match) or return undef;
+
++ eval { require version };
+ my $eval = qq{q# Hide from _packages_inside()
+ #; package Module::Build::Base::_version;
+ no strict;
Please sign in to comment.
Something went wrong with that request. Please try again.