randyk 2003/08/18 22:07:44
Modified: . Makefile.PL Log: On Win32, use Win32::GetShortPathName() on paths containing spaces. Revision Changes Path 1.216 +8 -6 modperl/Makefile.PL Index: Makefile.PL =================================================================== RCS file: /home/cvs/modperl/Makefile.PL,v retrieving revision 1.215 retrieving revision 1.216 diff -u -r1.215 -r1.216 --- Makefile.PL 9 Jul 2003 01:16:52 -0000 1.215 +++ Makefile.PL 19 Aug 2003 05:07:44 -0000 1.216 @@ -4,7 +4,8 @@ $Is_Win32 = ($^O eq "MSWin32"); $Is_Cygwin = ($^O =~ m/cygwin/g); if($Is_Win32) { - require 5.004_02; + require 5.004_02; + require Win32; } elsif($Is_Cygwin) { require 5.005_03; } else { @@ -2231,11 +2232,12 @@ # fix a path for Win32 Makefile sub win32_fix_path { - local $_ = shift; - $_ = File::Spec->rel2abs($_) if not File::Spec->file_name_is_absolute($_); - tr!\\!/!; - s!/$!!; - return $_; + my $path = shift; + $path = File::Spec->rel2abs($path) if not File::Spec->file_name_is_absolute($path); + $path = Win32::GetShortPathName($path) if $path =~ / /; + $path =~ tr!\\!/!; + $path =~ s!/$!!; + return $path; } # fix a path for mod_perl.dsp