compress 2.021
[p5sagit/p5-mst-13.2.git] / ext / IO-Compress / lib / IO / Compress / Base.pm
index 98bf5b4..7b558ea 100644 (file)
@@ -6,7 +6,7 @@ require 5.004 ;
 use strict ;
 use warnings;
 
-use IO::Compress::Base::Common 2.020 ;
+use IO::Compress::Base::Common 2.021 ;
 
 use IO::File ;
 use Scalar::Util qw(blessed readonly);
@@ -20,7 +20,7 @@ use bytes;
 our (@ISA, $VERSION);
 @ISA    = qw(Exporter IO::File);
 
-$VERSION = '2.020';
+$VERSION = '2.021';
 
 #Can't locate object method "SWASHNEW" via package "utf8" (perhaps you forgot to load "utf8"?) at .../ext/Compress-Zlib/Gzip/blib/lib/Compress/Zlib/Common.pm line 16.
 
@@ -486,14 +486,14 @@ sub _wr2
         my $status ;
         my $buff ;
         my $count = 0 ;
-        while (($status = read($fh, $buff, 16 * 1024)) > 0) {
+        while ($status = read($fh, $buff, 16 * 1024)) {
             $count += length $buff;
             defined $self->syswrite($buff, @_) 
                 or return undef ;
         }
 
         return $self->saveErrorString(undef, $!, $!) 
-            if $status < 0 ;
+            if ! defined $status ;
 
         if ( (!$isFilehandle || *$self->{AutoClose}) && $input ne '-')
         {