X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FFile%2FCopy.pm;h=828473e2d3f097c97c6f22105b8ed3d06111f74e;hb=4b711db359c9778a062571f88eafc4dab0b9c81d;hp=a01192bde218e96fee2f7b62028b0217ab22d268;hpb=ac7b122df953c27d4beccf03efed78ec25b8f64d;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/File/Copy.pm b/lib/File/Copy.pm index a01192b..828473e 100644 --- a/lib/File/Copy.pm +++ b/lib/File/Copy.pm @@ -10,7 +10,6 @@ package File::Copy; use 5.006; use strict; use warnings; -use Carp; use File::Spec; use Config; our(@ISA, @EXPORT, @EXPORT_OK, $VERSION, $Too_Big, $Syscopy_is_copy); @@ -24,7 +23,7 @@ sub mv; # package has not yet been updated to work with Perl 5.004, and so it # would be a Bad Thing for the CPAN module to grab it and replace this # module. Therefore, we set this module's version higher than 2.0. -$VERSION = '2.07'; +$VERSION = '2.08_01'; require Exporter; @ISA = qw(Exporter); @@ -33,6 +32,11 @@ require Exporter; $Too_Big = 1024 * 1024 * 2; +sub croak { + require Carp; + goto &Carp::croak; +} + my $macfiles; if ($^O eq 'MacOS') { $macfiles = eval { require Mac::MoreFiles }; @@ -78,7 +82,7 @@ sub copy { } if ((($Config{d_symlink} && $Config{d_readlink}) || $Config{d_link}) && - !($^O eq 'Win32' || $^O eq 'os2' || $^O eq 'vms')) { + !($^O eq 'MSWin32' || $^O eq 'os2' || $^O eq 'vms')) { my @fs = stat($from); if (@fs) { my @ts = stat($to); @@ -274,11 +278,10 @@ File::Copy - Copy files or filehandles copy("Copy.pm",\*STDOUT); move("/dev1/fileA","/dev2/fileB"); - use POSIX; - use File::Copy cp; + use File::Copy "cp"; $n = FileHandle->new("/a/file","r"); - cp($n,"x");' + cp($n,"x"); =head1 DESCRIPTION