This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update Module::Build to 0.3603
authorDavid Golden <dagolden@cpan.org>
Wed, 20 Jan 2010 02:33:35 +0000 (21:33 -0500)
committerDavid Golden <dagolden@cpan.org>
Wed, 20 Jan 2010 02:33:35 +0000 (21:33 -0500)
0.3603 - Mon Jan 18 22:28:59 EST 2010

 Bug fixes:

 - Module::Build::Compat would croak on distibutions that set requires
   'perl' to a dotted decimal like '5.6.2'.  We now skip that key
   since it doesn't go into PREREQ_PM and we numify it properly for
   'use 5.006002' in the generated Makefile.PL (RT#53409)
   [David Golden, adapted from patch by G. Allen Morris III]

0.3602 - Mon Jan 18 22:09:54 EST 2010

 Bug fixes:

 - Fix failures in t/properties/needs_compiler.t when $ENV{CC} is set
   (RT#53296) [David Golden, adapted from patch by Jens Rehsack]

0.3601 - Mon Dec 21 14:39:33 EST 2009

 Bug fixes:

 - When the currently running Module::Build is not the same as the one
   that created the Build file, there is now a warning rather than a fatal
   error.  This helps installation of dependency chains where a dependency
   might configure_requires a new Module::Build after Build.PL was already
   run for an earlier distribution. [David Golden, on advice of Matt Trout]

 Other:

 - t/bundle_inc.t fails in odd ways.  This test of an experimental feature
   should not prevent users from installing Module::Build, so this test
   now skips unless $ENV{MB_TEST_EXPERIMENTAL} is true

44 files changed:
Porting/Maintainers.pl
cpan/Module-Build/Changes
cpan/Module-Build/lib/Module/Build.pm
cpan/Module-Build/lib/Module/Build/Base.pm
cpan/Module-Build/lib/Module/Build/Compat.pm
cpan/Module-Build/lib/Module/Build/Config.pm
cpan/Module-Build/lib/Module/Build/Cookbook.pm
cpan/Module-Build/lib/Module/Build/Dumper.pm
cpan/Module-Build/lib/Module/Build/ModuleInfo.pm
cpan/Module-Build/lib/Module/Build/Notes.pm
cpan/Module-Build/lib/Module/Build/PPMMaker.pm
cpan/Module-Build/lib/Module/Build/Platform/Amiga.pm
cpan/Module-Build/lib/Module/Build/Platform/Default.pm
cpan/Module-Build/lib/Module/Build/Platform/EBCDIC.pm
cpan/Module-Build/lib/Module/Build/Platform/MPEiX.pm
cpan/Module-Build/lib/Module/Build/Platform/MacOS.pm
cpan/Module-Build/lib/Module/Build/Platform/RiscOS.pm
cpan/Module-Build/lib/Module/Build/Platform/Unix.pm
cpan/Module-Build/lib/Module/Build/Platform/VMS.pm
cpan/Module-Build/lib/Module/Build/Platform/VOS.pm
cpan/Module-Build/lib/Module/Build/Platform/Windows.pm
cpan/Module-Build/lib/Module/Build/Platform/aix.pm
cpan/Module-Build/lib/Module/Build/Platform/cygwin.pm
cpan/Module-Build/lib/Module/Build/Platform/darwin.pm
cpan/Module-Build/lib/Module/Build/Platform/os2.pm
cpan/Module-Build/lib/Module/Build/PodParser.pm
cpan/Module-Build/lib/inc/latest.pm
cpan/Module-Build/lib/inc/latest/private.pm
cpan/Module-Build/t/basic.t
cpan/Module-Build/t/bundle_inc.t
cpan/Module-Build/t/compat.t
cpan/Module-Build/t/destinations.t
cpan/Module-Build/t/ext.t
cpan/Module-Build/t/files.t
cpan/Module-Build/t/help.t
cpan/Module-Build/t/install.t
cpan/Module-Build/t/manifypods.t
cpan/Module-Build/t/metadata2.t
cpan/Module-Build/t/pod_parser.t
cpan/Module-Build/t/properties/needs_compiler.t
cpan/Module-Build/t/script_dist.t
cpan/Module-Build/t/test_type.t
cpan/Module-Build/t/test_types.t
cpan/Module-Build/t/tilde.t

index a946ddc..919ccb1 100755 (executable)
@@ -1004,7 +1004,7 @@ use File::Glob qw(:case);
     'Module::Build' =>
        {
        'MAINTAINER'    => 'kwilliams',
-       'DISTRIBUTION'  => 'DAGOLDEN/Module-Build-0.36.tar.gz',
+       'DISTRIBUTION'  => 'DAGOLDEN/Module-Build-0.3603.tar.gz',
        'FILES'         => q[cpan/Module-Build],
        'EXCLUDED'      => [ qw{ t/par.t t/signature.t },
                             qr!^contrib/!,  qr!^devtools! ],
index 19f401c..ad9195c 100644 (file)
@@ -1,5 +1,41 @@
 Revision history for Perl extension Module::Build.
 
+0.3603 - Mon Jan 18 22:28:59 EST 2010
+
+(Oops, I released the last one before I realized this should have been
+fixed along with it.)
+
+ Bug fixes:
+
+ - Module::Build::Compat would croak on distibutions that set requires
+   'perl' to a dotted decimal like '5.6.2'.  We now skip that key
+   since it doesn't go into PREREQ_PM and we numify it properly for
+   'use 5.006002' in the generated Makefile.PL (RT#53409)
+   [David Golden, adapted from patch by G. Allen Morris III]
+
+0.3602 - Mon Jan 18 22:09:54 EST 2010
+
+ Bug fixes:
+
+ - Fix failures in t/properties/needs_compiler.t when $ENV{CC} is set
+   (RT#53296) [David Golden, adapted from patch by Jens Rehsack]
+
+0.3601 - Mon Dec 21 14:39:33 EST 2009
+
+ Bug fixes:
+
+ - When the currently running Module::Build is not the same as the one
+   that created the Build file, there is now a warning rather than a fatal
+   error.  This helps installation of dependency chains where a dependency
+   might configure_requires a new Module::Build after Build.PL was already
+   run for an earlier distribution. [David Golden, on advice of Matt Trout]
+
+ Other:
+
+ - t/bundle_inc.t fails in odd ways.  This test of an experimental feature
+   should not prevent users from installing Module::Build, so this test
+   now skips unless $ENV{MB_TEST_EXPERIMENTAL} is true
+
 0.36 - Sun Dec 20 15:02:38 EST 2009
 
 No changes from 0.35_15 other than the version number.
index 517a4a6..356fd42 100644 (file)
@@ -15,7 +15,7 @@ use Module::Build::Base;
 
 use vars qw($VERSION @ISA);
 @ISA = qw(Module::Build::Base);
-$VERSION = '0.36';
+$VERSION = '0.3603';
 $VERSION = eval $VERSION;
 
 # Okay, this is the brute-force method of finding out what kind of
@@ -750,7 +750,8 @@ false to prevent the custom resource file from being loaded.
 Suppresses the check upon startup that the version of Module::Build
 we're now running under is the same version that was initially invoked
 when building the distribution (i.e. when the C<Build.PL> script was
-first run).  Use with caution.
+first run).  As of 0.3601, a mismatch results in a warning instead of
+a fatal error, so this option effectively just suppresses the warning.
 
 =item debug
 
index afecaac..5bd8ec7 100644 (file)
@@ -4,7 +4,7 @@ package Module::Build::Base;
 
 use strict;
 use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
 $VERSION = eval $VERSION;
 BEGIN { require 5.00503 }
 
@@ -103,10 +103,13 @@ sub resume {
 
   unless ($self->allow_mb_mismatch) {
     my $mb_version = $Module::Build::VERSION;
-    die(" * ERROR: Configuration was initially created with Module::Build version '$self->{properties}{mb_version}',\n".
-       "   but we are now using version '$mb_version'.  Please re-run the Build.PL or Makefile.PL script,\n".
-       "   or use --allow_mb_mismatch 1 to skip this version check.\n")
-    if $mb_version ne $self->{properties}{mb_version};
+    if ( $mb_version ne $self->{properties}{mb_version} ) {
+      $self->log_warn(<<"MISMATCH");
+* WARNING: Configuration was initially created with Module::Build 
+  version '$self->{properties}{mb_version}' but we are now using version '$mb_version'.
+  If errors occur, you must re-run the Build.PL or Makefile.PL script.
+MISMATCH
+    }
   }
 
   $self->{invoked_action} = $self->{action} ||= 'build';
index 4130917..95d695f 100644 (file)
@@ -2,7 +2,7 @@ package Module::Build::Compat;
 
 use strict;
 use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
 
 use File::Basename ();
 use File::Spec;
@@ -10,6 +10,7 @@ use IO::File;
 use Config;
 use Module::Build;
 use Module::Build::ModuleInfo;
+use Module::Build::Version;
 use Data::Dumper;
 
 my %convert_installdirs = (
@@ -76,6 +77,7 @@ sub _merge_prereq {
   # validate formats
   for my $p ( $req, $breq ) {
     for my $k (keys %$p) {
+      next if $k eq 'perl';
       die "Prereq '$p->{$k}' for '$k' is not supported by Module::Build::Compat\n"
         unless _simple_prereq($p->{$k});
     }
@@ -124,7 +126,8 @@ HERE
   # Makefile.PL
   my $requires = $build->requires;
   if ( my $minimum_perl = $requires->{perl} ) {
-    print {$fh} "require $minimum_perl;\n";
+    my $min_ver = Module::Build::Version->new($minimum_perl)->numify;
+    print {$fh} "require $min_ver;\n";
   }
 
   # If a *bundled* custom subclass is being used, make sure we add its
index ab66831..9979600 100644 (file)
@@ -2,7 +2,7 @@ package Module::Build::Config;
 
 use strict;
 use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
 $VERSION = eval $VERSION;
 use Config;
 
index 8a52f41..a68dca5 100644 (file)
@@ -1,7 +1,7 @@
 package Module::Build::Cookbook;
 use strict;
 use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
 
 
 =head1 NAME
index 7ab85c0..2a9bad1 100644 (file)
@@ -1,7 +1,7 @@
 package Module::Build::Dumper;
 use strict;
 use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
 
 # This is just a split-out of a wrapper function to do Data::Dumper
 # stuff "the right way".  See:
index 4730d79..053ae18 100644 (file)
@@ -8,7 +8,7 @@ package Module::Build::ModuleInfo;
 
 use strict;
 use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
 $VERSION = eval $VERSION;
 
 use File::Spec;
index 81865bc..cf85d4e 100644 (file)
@@ -4,7 +4,7 @@ package Module::Build::Notes;
 
 use strict;
 use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
 $VERSION = eval $VERSION;
 use Data::Dumper;
 use IO::File;
index b616a4d..977b437 100644 (file)
@@ -5,7 +5,7 @@ use Config;
 use vars qw($VERSION);
 use IO::File;
 
-$VERSION = '0.36';
+$VERSION = '0.3603';
 $VERSION = eval $VERSION;
 
 # This code is mostly borrowed from ExtUtils::MM_Unix 6.10_03, with a
index 48919f5..9356325 100644 (file)
@@ -2,7 +2,7 @@ package Module::Build::Platform::Amiga;
 
 use strict;
 use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
 $VERSION = eval $VERSION;
 use Module::Build::Base;
 
index f807cdd..8d46fc4 100644 (file)
@@ -2,7 +2,7 @@ package Module::Build::Platform::Default;
 
 use strict;
 use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
 $VERSION = eval $VERSION;
 use Module::Build::Base;
 
index 710c10b..140e278 100644 (file)
@@ -2,7 +2,7 @@ package Module::Build::Platform::EBCDIC;
 
 use strict;
 use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
 $VERSION = eval $VERSION;
 use Module::Build::Base;
 
index a67a5c9..66bbdc9 100644 (file)
@@ -2,7 +2,7 @@ package Module::Build::Platform::MPEiX;
 
 use strict;
 use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
 $VERSION = eval $VERSION;
 use Module::Build::Base;
 
index e89754c..b80781b 100644 (file)
@@ -2,7 +2,7 @@ package Module::Build::Platform::MacOS;
 
 use strict;
 use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
 $VERSION = eval $VERSION;
 use Module::Build::Base;
 use vars qw(@ISA);
index c861d9d..95e3151 100644 (file)
@@ -2,7 +2,7 @@ package Module::Build::Platform::RiscOS;
 
 use strict;
 use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
 $VERSION = eval $VERSION;
 use Module::Build::Base;
 
index 2eebc80..0be5fc7 100644 (file)
@@ -2,7 +2,7 @@ package Module::Build::Platform::Unix;
 
 use strict;
 use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
 $VERSION = eval $VERSION;
 use Module::Build::Base;
 
index c110a8d..f406b7a 100644 (file)
@@ -2,7 +2,7 @@ package Module::Build::Platform::VMS;
 
 use strict;
 use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
 $VERSION = eval $VERSION;
 use Module::Build::Base;
 use Config;
index 1ec5fe6..001a950 100644 (file)
@@ -2,7 +2,7 @@ package Module::Build::Platform::VOS;
 
 use strict;
 use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
 $VERSION = eval $VERSION;
 use Module::Build::Base;
 
index 38f6662..1e248a7 100644 (file)
@@ -2,7 +2,7 @@ package Module::Build::Platform::Windows;
 
 use strict;
 use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
 $VERSION = eval $VERSION;
 
 use Config;
index 1b932e0..dab0648 100644 (file)
@@ -2,7 +2,7 @@ package Module::Build::Platform::aix;
 
 use strict;
 use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
 $VERSION = eval $VERSION;
 use Module::Build::Platform::Unix;
 
index 484490f..37c59ad 100644 (file)
@@ -2,7 +2,7 @@ package Module::Build::Platform::cygwin;
 
 use strict;
 use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
 $VERSION = eval $VERSION;
 use Module::Build::Platform::Unix;
 
index 4d9986f..c2f3126 100644 (file)
@@ -2,7 +2,7 @@ package Module::Build::Platform::darwin;
 
 use strict;
 use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
 $VERSION = eval $VERSION;
 use Module::Build::Platform::Unix;
 
index ae0b67a..be164ae 100644 (file)
@@ -2,7 +2,7 @@ package Module::Build::Platform::os2;
 
 use strict;
 use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
 $VERSION = eval $VERSION;
 use Module::Build::Platform::Unix;
 
index 7259d8b..225450c 100644 (file)
@@ -2,7 +2,7 @@ package Module::Build::PodParser;
 
 use strict;
 use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
 $VERSION = eval $VERSION;
 use vars qw(@ISA);
 
index 9323452..fc9e2e9 100644 (file)
@@ -1,7 +1,7 @@
 package inc::latest;
 use strict;
 use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
 $VERSION = eval $VERSION;
 
 use Carp;
index c194fbd..572ae8a 100644 (file)
@@ -1,7 +1,7 @@
 package inc::latest::private;
 use strict;
 use vars qw($VERSION);
-$VERSION = '0.36';
+$VERSION = '0.3603';
 $VERSION = eval $VERSION;
 
 use File::Spec;
index 74c50b6..5d76ffa 100644 (file)
@@ -146,7 +146,7 @@ $dist->chdir_in;
   is $mb->args('dee'), 'goo';
   is $mb->destdir, 'yo';
   my %runtime = $mb->runtime_params;
-  is_deeply \%runtime, 
+  is_deeply \%runtime,
     {
      verbose => 1,
      destdir => 'yo',
index b6b0a77..e974c26 100644 (file)
@@ -18,6 +18,9 @@ blib_load('Module::Build::ConfigData');
 if ( $ENV{PERL_CORE} ) {
   plan skip_all => 'bundle_inc tests will never succeed in PERL_CORE';
 }
+elsif ( ! $ENV{MB_TEST_EXPERIMENTAL} ) {
+  plan skip_all => '$ENV{MB_TEST_EXPERIMENTAL} is not set';
+}
 elsif ( ! MBTest::check_EUI() ) {
   plan skip_all => 'ExtUtils::Installed takes too long on your system';
 }
index f84b79b..0a820a9 100644 (file)
@@ -67,7 +67,7 @@ test_makefile_types();
 # Test with requires and PL_files
 
 my $distname = $dist->name;
-$dist->change_build_pl({ 
+$dist->change_build_pl({
   module_name         => $distname,
   license             => 'perl',
   requires            => {
@@ -104,7 +104,7 @@ test_makefile_types(
 
 ######################
 
-$dist->change_build_pl({ 
+$dist->change_build_pl({
   module_name         => $distname,
   license             => 'perl',
 });
@@ -140,7 +140,7 @@ ok $mb, "Module::Build->new_from_context";
   });
   foreach my $style ('passthrough', 'small') {
     create_makefile_pl($style, $foo_builder);
-    
+
     # Should fail with "can't find Foo/Builder.pm"
     my $result;
     my ($stdout, $stderr ) = stdout_stderr_of (sub {
@@ -149,7 +149,7 @@ ok $mb, "Module::Build->new_from_context";
     ok ! $result, "Makefile.PL failed";
     like $stderr, qr{Foo/Builder.pm}, "custom builder wasn't found";
   }
-  
+
   # Now make sure it can actually work.
   my $bar_builder;
   stdout_stderr_of( sub {
@@ -243,7 +243,7 @@ ok $mb, "Module::Build->new_from_context";
       if ExtUtils::Install->VERSION < 1.32;
 
     for my $c (@cases) {
-      my @make_args = @{$c->{args}}; 
+      my @make_args = @{$c->{args}};
       if ($is_vms_mms) { # VMS MMK/MMS macros use different syntax.
         $make_args[0] = '/macro=("' . join('","',@make_args) . '")';
         pop @make_args while scalar(@make_args) > 1;
@@ -284,7 +284,7 @@ ok $mb, "Module::Build->new_from_context";
   my $b2 = Module::Build->current;
   ok $b2->install_base, "install_base set";
   unlike $b2->install_base, qr/^~/, "Tildes should be expanded";
-  
+
   stdout_stderr_of( sub { $mb->do_system(@make, 'realclean'); } );
   ok ! -e $makefile, "$makefile shouldn't exist";
 
@@ -341,7 +341,7 @@ sub test_makefile_types {
   $opts{PL_files} ||= {};
 
   foreach my $type (@makefile_types) {
-    # Create M::B instance 
+    # Create M::B instance
     my $mb;
     stdout_stderr_of( sub {
         $mb = Module::Build->new_from_context;
@@ -355,7 +355,7 @@ sub test_makefile_types {
     test_makefile_creation($mb);
     test_makefile_prereq_pm( _merge_prereqs($opts{requires}, $opts{build_requires}) );
     test_makefile_pl_files( $opts{PL_files} ) if $type eq 'traditional';
-      
+
     my ($output,$success);
     # Capture output to keep our STDOUT clean
     $output = stdout_stderr_of( sub {
@@ -373,7 +373,7 @@ sub test_makefile_types {
     });
     ok $success, "make test ran without error";
     like uc $output, qr{DONE\.|SUCCESS}, "make test output indicated success";
-    
+
     $output = stdout_stderr_of( sub {
       $success = $mb->do_system(@make, 'realclean');
     });
@@ -381,7 +381,7 @@ sub test_makefile_types {
 
     # Try again with some Makefile.PL arguments
     test_makefile_creation($mb, [], 'INSTALLDIRS=vendor', 'realclean');
-    
+
     # Try again using distclean
     test_makefile_creation($mb, [], '', 'distclean');
 
@@ -392,7 +392,7 @@ sub test_makefile_types {
 
 sub test_makefile_creation {
   my ($build, $preargs, $postargs, $cleanup) = @_;
-  
+
   my ($output, $result);
   # capture output to avoid polluting our test output
   $output = stdout_stderr_of( sub {
@@ -404,7 +404,7 @@ sub test_makefile_creation {
   }
   ok $result, $label;
   ok -e $makefile, "$makefile exists";
-  
+
   if ($cleanup) {
     # default to 'realclean' unless we recognize the clean method
     $cleanup = 'realclean' unless $cleanup =~ /^(dist|real)clean$/;
@@ -457,7 +457,7 @@ sub test_makefile_pl_requires_perl {
 }
 
 sub find_params_in_makefile {
-  my $fh = IO::File->new( $makefile, 'r' ) 
+  my $fh = IO::File->new( $makefile, 'r' )
     or die "Can't read $makefile: $!";
   local($/) = "\n";
 
index 07247a3..2b9aba6 100644 (file)
@@ -242,14 +242,14 @@ $mb->prefix(undef);
     my %test_config;
     foreach my $type (keys %$defaults) {
         my $prefix = shift @prefixes || [qw(foo bar)];
-        $test_config{$type} = catdir(File::Spec->rootdir, @$prefix, 
+        $test_config{$type} = catdir(File::Spec->rootdir, @$prefix,
                                      @{$defaults->{$type}});
     }
 
     # Poke at the innards of MB to change the default install locations.
     my $old =  $mb->install_sets->{site};
     $mb->install_sets->{site} = \%test_config;
-    $mb->config(siteprefixexp => catdir(File::Spec->rootdir, 
+    $mb->config(siteprefixexp => catdir(File::Spec->rootdir,
                                        'wierd', 'prefix'));
 
     my $prefix = catdir('another', 'prefix');
index 6101bcc..3c60a65 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use lib 't/lib';
 use MBTest;
 
-my @unix_splits = 
+my @unix_splits =
   (
    { q{one t'wo th'ree f"o\"ur " "five" } => [ 'one', 'two three', 'fo"ur ', 'five' ] },
    { q{ foo bar }                         => [ 'foo', 'bar'                         ] },
@@ -13,7 +13,7 @@ my @unix_splits =
    { qq{one\\\ntwo}                       => [ "one\ntwo"                           ] },  # TODO
   );
 
-my @win_splits = 
+my @win_splits =
   (
    { 'a" "b\\c" "d'         => [ 'a b\c d'       ] },
    { '"a b\\c d"'           => [ 'a b\c d'       ] },
index cf822fb..625a473 100644 (file)
@@ -19,19 +19,19 @@ my $mb = Module::Build->new_from_context;
 
 {
   # Make sure copy_if_modified() can handle spaces in filenames
-  
+
   my @tmp;
   push @tmp, MBTest->tmpdir for (0 .. 1);
-  
+
   my $filename = 'file with spaces.txt';
-  
+
   my $file = File::Spec->catfile($tmp[0], $filename);
   my $fh = IO::File->new($file, '>') or die "Can't create $file: $!";
   print $fh "Foo\n";
   $fh->close;
   ok -e $file;
-  
-  
+
+
   my $file2 = $mb->copy_if_modified(from => $file, to_dir => $tmp[1]);
   ok $file2;
   ok -e $file2;
@@ -41,7 +41,7 @@ my $mb = Module::Build->new_from_context;
   # Try some dir_contains() combinations
   my $first  = File::Spec->catdir('', 'one', 'two');
   my $second = File::Spec->catdir('', 'one', 'two', 'three');
-  
+
   ok( Module::Build->dir_contains($first, $second) );
 }
 
index 2bf34c8..0534c92 100644 (file)
@@ -51,7 +51,7 @@ my $mb = Module::Build->subclass(
     sub ACTION_bar { die "barey" }
     sub ACTION_baz { die "bazey" }
 
-    # guess we can have extra pod later 
+    # guess we can have extra pod later
 
     =over
 
@@ -211,7 +211,7 @@ my $mb = Module::Build->subclass(
     sub ACTION_baz { die "bazey" }
     sub ACTION_batz { die "batzey" }
 
-    # guess we can have extra pod later 
+    # guess we can have extra pod later
     # Though, I do wonder whether we should allow them to mix...
     # maybe everything should have to be head2?
 
@@ -243,7 +243,7 @@ my %also = (
   bar => "\n=head3 bears\n\nBe careful with bears.\n",
   baz => "\n=head4 What's a baz\\?\n",
 );
-  
+
 foreach my $action (qw(foo bar baz)) {
   my $doc = $mb->get_action_docs($action);
   ok($doc, "got doc for '$action'");
index 66cdd5c..ffe8afc 100644 (file)
@@ -61,15 +61,15 @@ $mb->add_to_cleanup($destdir);
 {
   eval {$mb->dispatch('install', destdir => $destdir)};
   is $@, '';
-  
+
   my @libdir = strip_volume( $mb->install_destination('lib') );
   my $install_to = File::Spec->catfile($destdir, @libdir, $dist->name ) . '.pm';
   file_exists($install_to);
-  
+
   local @INC = (@INC, File::Spec->catdir($destdir, @libdir));
   eval "require @{[$dist->name]}";
   is $@, '';
-  
+
   # Make sure there's a packlist installed
   my $archdir = $mb->install_destination('arch');
   my @dirs = strip_volume($archdir);
@@ -106,19 +106,19 @@ $mb->add_to_cleanup($destdir);
 
 {
   # Test the ConfigData stuff
-  
+
   $mb->config_data(foo => 'bar');
   $mb->features(baz => 1);
   $mb->auto_features(auto_foo => {requires => {'File::Spec' => 0}});
   eval {$mb->dispatch('install', destdir => $destdir)};
   is $@, '';
-  
+
   my @libdir = strip_volume( $mb->install_destination('lib') );
   local @INC = (@INC, File::Spec->catdir($destdir, @libdir));
   eval "require @{[$dist->name]}::ConfigData";
 
   is $mb->feature('auto_foo'), 1;
-  
+
   SKIP: {
     skip $@, 5 if @_;
 
@@ -153,7 +153,7 @@ is $@, '';
   my $libdir = File::Spec->catdir('', 'foo', 'lib');
   eval {$mb->run_perl_script('Build.PL', [], ['--install_path', "lib=$libdir"])};
   is $@, '';
-  
+
   my $cmd = 'Build';
      $cmd .= ".COM" if $^O eq 'VMS';
   eval {$mb->run_perl_script($cmd, [], ['install', '--destdir', $destdir])};
@@ -165,10 +165,10 @@ is $@, '';
   eval {$mb->run_perl_script($cmd, [], ['install', '--destdir', $destdir,
                                              '--install_base', $basedir])};
   is $@, '';
-  
+
   $install_to = File::Spec->catfile($destdir, $libdir, $dist->name ) . '.pm';
   is -e $install_to, 1, "Look for file at $install_to";
-  
+
   eval {$mb->dispatch('realclean')};
   is $@, '';
 }
@@ -214,11 +214,11 @@ Simple Man <simple@example.com>
   $expect = lc($expect) if $^O eq 'VMS';
 
   is $pods->{$expect}, $expect;
-  
+
   my $pms = $mb->_find_file_by_type('awefawef', 'lib');
   ok $pms;
   is keys %$pms, 0;
-  
+
   $pms = $mb->_find_file_by_type('pod', 'awefawef');
   ok $pms;
   is keys %$pms, 0;
index 5947646..aa33ffc 100644 (file)
@@ -118,7 +118,7 @@ while (my ($from, $v) = each %distro) {
     ok ! $mb->contains_pod($from), "$from should not contain POD";
     next;
   }
-  
+
   my $to = File::Spec->catfile('blib', ($from =~ /^[\.\/\[]*lib/ ? 'libdoc' : 'bindoc'), $v);
   ok $mb->contains_pod($from), "$from should contain POD";
   ok -e $to, "Created $to manpage";
index 954b658..a0fdd60 100644 (file)
@@ -42,12 +42,12 @@ SKIP: {
 
 my $provides; # Used a bunch of times below
 
-my $pod_text = <<'---'; 
+my $pod_text = <<'---';
 =pod
 
 =head1 NAME
 
-Simple - A simple module 
+Simple - A simple module
 
 =head1 AUTHOR
 
@@ -77,11 +77,11 @@ $dist->regen( clean => 1 );
 ok( -e "lib/Simple.pm", "Creating Simple.pm" );
 my $mb = Module::Build->new_from_context;
 $mb->do_create_readme;
-like( slurp("README"), qr/NAME/, 
+like( slurp("README"), qr/NAME/,
     "Generating README from .pm");
-is( $mb->dist_author->[0], 'Simple Simon <simon@simple.sim>', 
+is( $mb->dist_author->[0], 'Simple Simon <simon@simple.sim>',
     "Extracting AUTHOR from .pm");
-is( $mb->dist_abstract, "A simple module", 
+is( $mb->dist_abstract, "A simple module",
     "Extracting abstract from .pm");
 
 # .pm File with pod in separate file
@@ -99,12 +99,12 @@ ok( -e "lib/Simple.pod", "Creating Simple.pod" );
 $mb = Module::Build->new_from_context;
 $mb->do_create_readme;
 like( slurp("README"), qr/NAME/, "Generating README from .pod");
-is( $mb->dist_author->[0], 'Simple Simon <simon@simple.sim>', 
+is( $mb->dist_author->[0], 'Simple Simon <simon@simple.sim>',
     "Extracting AUTHOR from .pod");
-is( $mb->dist_abstract, "A simple module", 
+is( $mb->dist_abstract, "A simple module",
     "Extracting abstract from .pod");
 
-# .pm File with pod and separate pod file 
+# .pm File with pod and separate pod file
 #
 
 $dist->change_file( 'lib/Simple.pm', <<'---' );
index 64d4c75..c47d738 100644 (file)
@@ -10,14 +10,14 @@ blib_load('Module::Build::PodParser');
 
 {
   package IO::StringBased;
-  
+
   sub TIEHANDLE {
     my ($class, $string) = @_;
     return bless {
                  data => [ map "$_\n", split /\n/, $string],
                 }, $class;
   }
-  
+
   sub READLINE {
     shift @{ shift()->{data} };
   }
@@ -59,7 +59,7 @@ EOF
 
   my $pp = Module::Build::PodParser->new(fh => \*FH);
   ok $pp, 'object created';
-  
+
   is_deeply $pp->get_author, [], 'author';
   is $pp->get_abstract, 'Perl extension for blah blah blah', 'abstract';
 }
index f298e82..f616dfc 100644 (file)
@@ -106,6 +106,9 @@ is( $mb->build_requires->{'ExtUtils::CBuilder'}, 0.2,
 # falsify compiler and test error handling
 #--------------------------------------------------------------------------#
 
+# clear $ENV{CC} so we are sure to fail to find our fake compiler :-)
+local $ENV{CC};
+
 my $err = stderr_of( sub {
     $mb = $dist->new_from_context( config => { cc => "adfasdfadjdjk" } )
 });
index 02faca0..7fd82d9 100644 (file)
@@ -15,7 +15,7 @@ blib_load('Module::Build::ConfigData');
 my $dist = DistGen->new(dir => MBTest->tmpdir);
 $dist->add_file('bin/foo', undent(<<'  ---'));
   #!/usr/bin/perl
-  
+
   package bin::foo;
   $VERSION = 0.01;
 
index fe4d599..bdbf0cd 100644 (file)
@@ -21,7 +21,7 @@ my $dist = DistGen->new( dir => $tmp );
 
 
 $dist->add_file('t/special_ext.st', <<'---' );
-#!perl 
+#!perl
 use Test::More tests => 2;
 ok(1, 'first test in special_ext');
 ok(1, 'second test in special_ext');
@@ -37,7 +37,7 @@ $dist->chdir_in;
 $::x = 0;
 my $mb = Module::Build->subclass(
     code => q#
-        sub ACTION_testspecial { 
+        sub ACTION_testspecial {
             $::x++;
             shift->generic_test(type => 'special');
         }
index d88e215..bcb58c4 100644 (file)
@@ -11,20 +11,20 @@ use DistGen;
 my $dist = DistGen->new()->chdir_in;
 
 $dist->add_file('t/special_ext.st', <<'---');
-#!perl 
+#!perl
 use Test::More tests => 2;
 ok(1, 'first test in special_ext');
 ok(1, 'second test in special_ext');
 ---
 
 $dist->add_file('t/another_ext.at', <<'---');
-#!perl 
+#!perl
 use Test::More tests => 2;
 ok(1, 'first test in another_ext');
 ok(1, 'second test in another_ext');
 ---
 $dist->add_file('t/foo.txt', <<'---');
-#!perl 
+#!perl
 use Test::More tests => 1;
 ok 0, "don't run this non-test file";
 die "don't run this non-test file";
@@ -35,11 +35,11 @@ $dist->regen;
 
 my $mb = Module::Build->subclass(
    code => q#
-        sub ACTION_testspecial { 
+        sub ACTION_testspecial {
             shift->generic_test(type => 'special');
         }
 
-        sub ACTION_testanother { 
+        sub ACTION_testanother {
             shift->generic_test(type => 'another');
         }
   #
@@ -99,7 +99,7 @@ is(scalar(@{[$all_output =~ m/ALL TESTS SUCCESSFUL\./mg]}),   1);
 $dist->revert;
 
 $dist->add_file('t/foo/special.st', <<'---');
-#!perl 
+#!perl
 use Test::More tests => 2;
 ok(1, 'first test in special_ext');
 ok(1, 'second test in special_ext');
@@ -113,11 +113,11 @@ $dist->regen;
 
 my $mb = Module::Build->subclass(
    code => q#
-        sub ACTION_testspecial { 
+        sub ACTION_testspecial {
             shift->generic_test(type => 'special');
         }
 
-        sub ACTION_testanother { 
+        sub ACTION_testanother {
             shift->generic_test(type => 'another');
         }
   #
index 692ade0..a5ed790 100644 (file)
@@ -55,7 +55,7 @@ SKIP: {
     is( run_sample( $p => '~/foo' )->$p(),  "$home/foo" );
 
     is( run_sample( $p => '~/ foo')->$p(),  "$home/ foo" );
-      
+
     is( run_sample( $p => '~/fo o')->$p(),  "$home/fo o" );
 
     is( run_sample( $p => 'foo~'  )->$p(),  'foo~' );
@@ -97,7 +97,7 @@ SKIP: {
     my @info = eval { getpwuid $> };
     skip "No home directory for tilde-expansion tests", 1 if $@;
     my ($me, $home) = @info[0,7];
-    
+
     my $expected = "$home/foo";
 
     if ($^O eq 'VMS') {