diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Cwd.pm | 7 | ||||
-rw-r--r-- | lib/ExtUtils/MM.pm | 8 | ||||
-rwxr-xr-x | lib/File/CheckTree.t | 5 | ||||
-rw-r--r-- | lib/File/Copy.pm | 3 |
4 files changed, 20 insertions, 3 deletions
diff --git a/lib/Cwd.pm b/lib/Cwd.pm index 70aa8110bf..cfc0294c2b 100644 --- a/lib/Cwd.pm +++ b/lib/Cwd.pm @@ -660,7 +660,12 @@ sub _os2_cwd { } sub _win32_cwd { - $ENV{'PWD'} = Win32::GetCwd(); + if (defined &DynaLoader::boot_DynaLoader) { + $ENV{'PWD'} = Win32::GetCwd(); + } + else { # miniperl + chomp($ENV{'PWD'} = `cd`); + } $ENV{'PWD'} =~ s:\\:/:g ; return $ENV{'PWD'}; } diff --git a/lib/ExtUtils/MM.pm b/lib/ExtUtils/MM.pm index e592bb829f..6fa2354a62 100644 --- a/lib/ExtUtils/MM.pm +++ b/lib/ExtUtils/MM.pm @@ -48,7 +48,13 @@ $Is{VMS} = $^O eq 'VMS'; $Is{OS2} = $^O eq 'os2'; $Is{MacOS} = $^O eq 'MacOS'; if( $^O eq 'MSWin32' ) { - Win32::IsWin95() ? $Is{Win95} = 1 : $Is{Win32} = 1; + if (defined &DynaLoader::boot_DynaLoader) { + Win32::IsWin95() ? $Is{Win95} = 1 : $Is{Win32} = 1; + } + else { + # Can't use Win32::* with miniperl + !(defined $ENV{SYSTEMROOT}) ? $Is{Win95} = 1 : $Is{Win32} = 1; + } } $Is{UWIN} = $^O =~ /^uwin(-nt)?$/; $Is{Cygwin} = $^O eq 'cygwin'; diff --git a/lib/File/CheckTree.t b/lib/File/CheckTree.t index 0257f4e6f0..60f1a425ab 100755 --- a/lib/File/CheckTree.t +++ b/lib/File/CheckTree.t @@ -11,6 +11,11 @@ BEGIN { plan tests => 6 } use strict; +# Cwd::cwd does an implicit "require Win32", but +# the ../lib directory in @INC will no longer work once +# we chdir() out of the "t" directory. +use Win32; + use File::CheckTree; use File::Spec; # used to get absolute paths diff --git a/lib/File/Copy.pm b/lib/File/Copy.pm index ea56dc6fae..d87c191c6f 100644 --- a/lib/File/Copy.pm +++ b/lib/File/Copy.pm @@ -258,7 +258,8 @@ unless (defined &syscopy) { # preserve MPE file attributes. return system('/bin/cp', '-f', $_[0], $_[1]) == 0; }; - } elsif ($^O eq 'MSWin32') { + } elsif ($^O eq 'MSWin32' && defined &DynaLoader::boot_DynaLoader) { + # Win32::CopyFile() fill only work if we can load Win32.xs *syscopy = sub { return 0 unless @_ == 2; return Win32::CopyFile(@_, 1); |