[patch] [Win32] Make Perl build on Win32 when the path contains whitespace
Max Maischein [Mon, 7 Jan 2008 20:48:04 +0000 (21:48 +0100)]
Message-ID: <478281F4.9000202@cpan.org>

p4raw-id: //depot/perl@32905

lib/ExtUtils/MM_Unix.pm
lib/File/CheckTree.t

index 4550727..3f922d4 100644 (file)
@@ -18,7 +18,7 @@ use vars qw($VERSION @ISA
 
 use ExtUtils::MakeMaker qw($Verbose neatvalue);
 
-$VERSION = '6.42_01';
+$VERSION = '6.42_02';
 $VERSION = eval $VERSION;
 
 require ExtUtils::MM_Any;
@@ -1980,6 +1980,9 @@ sub init_PERL {
         $self->{ABSPERL} = 'MCR '.$self->{ABSPERL} if $has_mcr;
     }
 
+    $self->{ABSPERL} = qq{"$self->{ABSPERL}"}
+        if $self->{ABSPERL} =~ /\s/;
+
     # Are we building the core?
     $self->{PERL_CORE} = $ENV{PERL_CORE} unless exists $self->{PERL_CORE};
     $self->{PERL_CORE} = 0               unless defined $self->{PERL_CORE};
index 1874e5a..b8a5652 100755 (executable)
@@ -135,13 +135,13 @@ chdir(File::Spec->updir) or die "cannot change to parent of t/ directory: $!";
     eval {
         $num_warnings = validate qq{
             lib                -d || die
-            $path_to_libFile   cd
+            '$path_to_libFile' cd
             Spec               -e
             Spec               -f
-            $path_to_dist      cd
+            '$path_to_dist'    cd
             README             -ef
             INSTALL            -d || warn
-            $path_to_libFile   -d || die
+            '$path_to_libFile' -d || die
         };
     };