if ($Config{d_symlink} && $Config{d_readlink} &&
!($^O eq 'Win32' || $^O eq 'os2' || $^O eq 'vms')) {
+ no warnings 'io'; # don't warn if -l on filehandle
if ((-e $from && -l $from) || (-e $to && -l $to)) {
my @fs = stat($from);
my @ts = stat($to);
$size = shift(@_) + 0;
croak("Bad buffer size for copy: $size\n") unless ($size > 0);
} else {
- no warnings 'uninitialized';
- $size = -s $from_h;
+ $size = tied(*$from_h) ? 0 : -s $from_h || 0;
$size = 1024 if ($size < 512);
$size = $Too_Big if ($size > $Too_Big);
}