This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
avoid File::Compare warning when passed handles (from Nick
authorGurusamy Sarathy <gsar@cpan.org>
Wed, 22 Mar 2000 16:55:42 +0000 (16:55 +0000)
committerGurusamy Sarathy <gsar@cpan.org>
Wed, 22 Mar 2000 16:55:42 +0000 (16:55 +0000)
Ing-Simmons)

p4raw-id: //depot/perl@5880

lib/File/Compare.pm

index 8a8afac..667e7cb 100644 (file)
@@ -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;
        }