projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
25f74a4
)
RE: [PATCH File::Copy] Silence warnings for tied filehandles
author
Wilson, Doug
<Doug_Wilson@intuit.com>
Fri, 12 Oct 2001 11:51:05 +0000
(
04:51
-0700)
committer
Jarkko Hietaniemi
<jhi@iki.fi>
Fri, 12 Oct 2001 22:46:49 +0000
(22:46 +0000)
Message-ID: <
35A280DF784CD411A06B0008C7B130AD0115DDAE
@sdex04.sd.intuit.com>
p4raw-id: //depot/perl@12419
lib/File/Copy.pm
patch
|
blob
|
history
diff --git
a/lib/File/Copy.pm
b/lib/File/Copy.pm
index
afb7635
..
be184a6
100644
(file)
--- a/
lib/File/Copy.pm
+++ b/
lib/File/Copy.pm
@@
-128,8
+128,7
@@
sub copy {
$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);
}