summaryrefslogtreecommitdiff
path: root/lib/File
diff options
context:
space:
mode:
authorJan Dubois <jand@activestate.com>2006-12-08 11:07:06 -0800
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-12-11 13:21:28 +0000
commitcf2f24a416dd5be7d3f4153bf173ec2a57eaed43 (patch)
tree5c890bc394cfd5ee124b8e0ec263e04104cbc10b /lib/File
parentc79bbeaf9959de37889eda1f77c9af1212f538ec (diff)
downloadperl-cf2f24a416dd5be7d3f4153bf173ec2a57eaed43.tar.gz
First patch from:
Subject: [PATCH] Move Win32::* functions from win32/win32.c to ext/Win32/Win32.xs Message-ID: <lc9kn2tb0p5sdd4q69rbc7067r4imar59r@4ax.com> p4raw-id: //depot/perl@29509
Diffstat (limited to 'lib/File')
-rwxr-xr-xlib/File/CheckTree.t5
-rw-r--r--lib/File/Copy.pm3
2 files changed, 7 insertions, 1 deletions
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);