From: Gurusamy Sarathy Date: Wed, 22 Mar 2000 16:55:42 +0000 (+0000) Subject: avoid File::Compare warning when passed handles (from Nick X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5c99b74dc9de7d22f41ca6ea0da3c9ce14cd34e0;p=p5sagit%2Fp5-mst-13.2.git avoid File::Compare warning when passed handles (from Nick Ing-Simmons) p4raw-id: //depot/perl@5880 --- diff --git a/lib/File/Compare.pm b/lib/File/Compare.pm index 8a8afac..667e7cb 100644 --- a/lib/File/Compare.pm +++ b/lib/File/Compare.pm @@ -78,7 +78,7 @@ sub compare { } else { unless (defined($size) && $size > 0) { - $size = $fromsize; + $size = $fromsize || -s TO || 0; $size = 1024 if $size < 512; $size = $Too_Big if $size > $Too_Big; }