This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Refactoring the /Can't return (?:array|hash) to scalar context/ croak
[perl5.git] / lib / Module / Build.pm
index ce65415..6d6cfe9 100644 (file)
@@ -15,7 +15,7 @@ use Module::Build::Base;
 
 use vars qw($VERSION @ISA);
 @ISA = qw(Module::Build::Base);
-$VERSION = '0.2806_01';
+$VERSION = '0.2808_02';
 $VERSION = eval $VERSION;
 
 # Okay, this is the brute-force method of finding out what kind of
@@ -34,6 +34,7 @@ my %OSTYPES = qw(
                 irix      Unix
                 darwin    Unix
                 machten   Unix
+                midnightbsd Unix
                 next      Unix
                 openbsd   Unix
                 netbsd    Unix
@@ -95,6 +96,10 @@ if (grep {-e File::Spec->catfile($_, qw(Module Build Platform), $^O) . '.pm'} @I
 
 sub os_type { $OSTYPES{$^O} }
 
+sub is_vmsish { return ((os_type() || '') eq 'VMS') }
+sub is_windowsish { return ((os_type() || '') eq 'Windows') }
+sub is_unixish { return ((os_type() || '') eq 'Unix') }
+
 1;
 
 __END__
@@ -162,12 +167,12 @@ action), 'test', and 'install'.  Other actions defined so far include:
   distdir                        retest      
   distmeta                       skipcheck   
   distsign                       test        
-  disttest                       testcover   
-  docs                           testdb      
-  fakeinstall                    testpod     
-  help                           testpodcoverage
-  html                           versioninstall
-  install                                    
+  disttest                       testall     
+  docs                           testcover   
+  fakeinstall                    testdb      
+  help                           testpod     
+  html                           testpodcoverage
+  install                        versioninstall
 
 
 You can run the 'help' action for a complete list of actions.
@@ -222,10 +227,8 @@ C<Build test verbose=1>), in which case their values last only for the
 lifetime of that command.  Per-action command line parameters take
 precedence over parameters specified at C<perl Build.PL> time.
 
-The build process also relies heavily on the C<Config.pm> module, and
-all the key=value pairs in C<Config.pm> are available in
-
-C<< $self->{config} >>.  If the user wishes to override any of the
+The build process also relies heavily on the C<Config.pm> module.
+If the user wishes to override any of the
 values in C<Config.pm>, she may specify them like so:
 
   perl Build.PL --config cc=gcc --config ld=gcc
@@ -519,7 +522,7 @@ for a bug report.
 [version 0.28]
 
 This action is identical to the C<install> action.  In the future,
-though, if C<install> starts writing to the file file
+though, when C<install> starts writing to the file 
 F<$(INSTALLARCHLIB)/perllocal.pod>, C<pure_install> won't, and that
 will be the only difference between them.
 
@@ -585,6 +588,33 @@ or use a C<glob()>-style pattern:
 
   ./Build test --test_files 't/01-*.t'
 
+=item testall
+
+[verion 0.2807]
+
+[Note: the 'testall' action and the code snippets below are currently
+in alpha stage, see
+L<"http://www.nntp.perl.org/group/perl.module.build/2007/03/msg584.html"> ]
+
+Runs the C<test> action plus each of the C<test$type> actions defined by
+the keys of the C<test_types> parameter.
+
+Currently, you need to define the ACTION_test$type method yourself and
+enumerate them in the test_types parameter.
+
+  my $mb = Module::Build->subclass(
+    code => q(
+      sub ACTION_testspecial { shift->generic_test(type => 'special'); }
+      sub ACTION_testauthor  { shift->generic_test(type => 'author'); }
+    )
+  )->new(
+    ...
+    test_types  => {
+      special => '.st',
+      author  => '.at',
+    },
+    ...
+
 =item testcover
 
 [version 0.26]