Skip Menu |

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

Report information
The Basics
Id: 76481
Status: rejected
Priority: 0/
Queue: IO-Compress

People
Owner: Nobody in particular
Requestors: DOUGW [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.049
Fixed in: (no value)



Subject: Give early notice on non-zip files
I download zip files, but every once in a while, they're really just text files. It would be nice if it died on: my $z = IO::Uncompress::Unzip->new($zip_file) or die "Feiled to open $zip_file: $UnzipError"; Instead it dies at: my $filename = $z->getHeaderInfo()->{Name}; because getHeaderInfo returns undef. Also, if I eval and ignore that error, then: my $status = $z->nextStream() dies with "Can't call method "reset" on an undefined value at .../IO/Uncompress/Base.pm line 958.
On Tue Apr 10 16:35:08 2012, DOUGW wrote: Show quoted text
> > I download zip files, but every once in a while, they're really just > text files. It would be nice if it died on: > > my $z = IO::Uncompress::Unzip->new($zip_file) > or die "Feiled to open $zip_file: $UnzipError";
It will of you want to disable Transparent mode my $z = IO::Uncompress::Unzip->new($zip_file, Transparent => 0) or die "Failed to open $zip_file: $UnzipError"; Paul
On Sat Apr 14 14:52:36 2012, PMQS wrote: Show quoted text
> On Tue Apr 10 16:35:08 2012, DOUGW wrote:
> > > > I download zip files, but every once in a while, they're really just > > text files. It would be nice if it died on: > > > > my $z = IO::Uncompress::Unzip->new($zip_file) > > or die "Feiled to open $zip_file: $UnzipError";
> > It will of you want to disable Transparent mode > > my $z = IO::Uncompress::Unzip->new($zip_file, > Transparent => 0) > or die "Failed to open $zip_file: $UnzipError";
Cool. Thanks. I read the docs, but apparently not carefully enough :-) -Doug