Package: libcompress-zlib-perl Version: 2.005-3 Severity: important Tags: upstream
Compress::Zlib(3pm): $gz->gzclose Closes the compressed file. Any pending data is flushed to the file before it is closed. Returns 1 on success, 0 on failure. The actual code: sub Compress::Zlib::gzFile::gzclose { my $self = shift ; my $gz = $self->[0] ; my $status = $gz->close() ; _save_gzerr($gz); return ! $status ; } IO::Compress::Gzip(3pm): close $z->close() ; close $z ; Returns true on success, otherwise 0. Compress::Zlib::gzFile::gzclose inverts the result from the underlying call, thus it returns 0 on success, 1 on failure. Contrary to the documentation. On the other hand, Compress::Zlib::gzFile::gzflush() does indeed return 1 on success and 0 on failure, which is the opposite of what versions before 2.0 did, thus potentially breaking many applications. Neither README nor changelog documents the change. I haven't checked all subroutines, but gzwrite() and gzread() seem to work the same. -- Magnus Holmgren [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]