Skip Menu |

This queue is for tickets about the IO-Compress CPAN distribution.

Report information
The Basics
Id: 95494
Status: resolved
Priority: 0/
Queue: IO-Compress

Owner: Nobody in particular
Requestors: ntyni [...]

Bug Information
Severity: Normal
Broken in:
  • 2.060
  • 2.064
Fixed in: 2.066

Subject: IO::Uncompress::Gunzip: Can no longer gunzip to in-memory file handle
Download (untitled) / with headers
text/plain 924b
Forwarding report from Christoph Biedl in <>. This appears to have broken between 2.037 and 2.040. I see the output parameter can be a scalar reference, so supporting output to in-memory file handles seems like duplicated functionality. Cristoph's reproducer script is attached. ----- IO-Compress 2.060 as bundled with Perl 5.18.2 introduces a regression over 2.033 (as in Debian wheezy) and older versions like 2.020 in squeeze: When uncompressing to a filehandle that is connected to an in-memory string with open $fh, '>', \$buf the syswrite() in IO::Uncompress::Base::_rd2 (line 759) fails with $! set to "Bad file descriptor". In previous versions, print was used instead which did not have this problem. The problem is not limited to gunzip decompression. FWIW, *gzip* to such a handle still works, also gzip and gunzip *from* a in-memory handle. ------
text/x-perl 259b
#!/usr/bin/perl use IO::Uncompress::Gunzip qw(gunzip $GunzipError); my $buf_out = ''; open my $fh_out, '>', \$buf_out or die $!; gunzip ( '/usr/share/doc/perl-modules/changelog.Debian.gz', $fh_out ) or die "Failed: $GunzipError, $!"; print $buf_out;
Thanks for the bug report. Have reproduced &fixed the issue in my development copy. cheers Paul

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to