SYN SYN
[p5sagit/p5-mst-13.2.git] / lib / File / Copy.pm
index 8df54e5..8d1d783 100644 (file)
@@ -7,10 +7,14 @@
 
 package File::Copy;
 
+use 5.005_64;
 use strict;
 use Carp;
-use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION $Too_Big
-           &copy &syscopy &cp &mv $Syscopy_is_copy);
+our(@ISA, @EXPORT, @EXPORT_OK, $VERSION, $Too_Big, $Syscopy_is_copy);
+sub copy;
+sub syscopy;
+sub cp;
+sub mv;
 
 # Note that this module implements only *part* of the API defined by
 # the File/Copy.pm module of the File-Tools-2.0 package.  However, that
@@ -79,7 +83,7 @@ sub copy {
     if ($from_a_handle) {
        *FROM = *$from{FILEHANDLE};
     } else {
-       $from = "./$from" if $from =~ /^\s/;
+       $from = "./$from" if $from =~ /^\s/s;
        open(FROM, "< $from\0") or goto fail_open1;
        binmode FROM or die "($!,$^E)";
        $closefrom = 1;
@@ -88,7 +92,7 @@ sub copy {
     if ($to_a_handle) {
        *TO = *$to{FILEHANDLE};
     } else {
-       $to = "./$to" if $to =~ /^\s/;
+       $to = "./$to" if $to =~ /^\s/s;
        open(TO,"> $to\0") or goto fail_open2;
        binmode TO or die "($!,$^E)";
        $closeto = 1;
@@ -217,7 +221,7 @@ File::Copy - Copy files or filehandles
        use POSIX;
        use File::Copy cp;
 
-       $n=FileHandle->new("/dev/null","r");
+       $n = FileHandle->new("/a/file","r");
        cp($n,"x");'
 
 =head1 DESCRIPTION