Skip Menu |

This queue is for tickets about the Archive-Zip CPAN distribution.

Report information
The Basics
Id: 18505
Status: open
Priority: 0/
Queue: Archive-Zip

People
Owner: Nobody in particular
Requestors: sgifford [...] suspectclass.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 0.11
  • 1.16
Fixed in: (no value)



Subject: Archive::Zip::_newFileHandle doesn't work with tied filehandles
In Archive::Zip version 116, around line 347 it says: elsif ( UNIVERSAL::isa( $fd, 'IO::Handle' ) or UNIVERSAL::isa( $fd, 'GLOB' ) ) { $handle = IO::File->new(); $status = $handle->fdopen( $fd, @_ ); } If $fd is a tied filehandle that isn't backed by a file descriptor, this fails, since there's no fd for fdopen to work with. Changing this function to just always use $handle = $fd seemed to work fine and fix the problem. Is there a reason it tries to dup the filehandle? Thanks!
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #18505] Archive::Zip::_newFileHandle doesn't work with tied filehandles
Date: Sun, 2 Apr 2006 23:03:37 -0500
To: Guest via RT <bug-Archive-Zip [...] rt.cpan.org>
From: Steve Peters <steve [...] fisharerojo.org>
On Sun, Apr 02, 2006 at 04:21:42PM -0400, Guest via RT wrote: Show quoted text
> > Sun Apr 02 16:21:41 2006: Request 18505 was acted upon. > Transaction: Ticket created by guest > Queue: Archive-Zip > Subject: Archive::Zip::_newFileHandle doesn't work with tied filehandles > Owner: Nobody > Requestors: sgifford@suspectclass.com > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=18505 > > > > In Archive::Zip version 116, around line 347 it says: > > elsif ( UNIVERSAL::isa( $fd, 'IO::Handle' ) > or UNIVERSAL::isa( $fd, 'GLOB' ) ) > { > $handle = IO::File->new(); > $status = $handle->fdopen( $fd, @_ ); > } > > If $fd is a tied filehandle that isn't backed by a file descriptor, this > fails, since there's no fd for fdopen to work with. > > Changing this function to just always use $handle = $fd seemed to work > fine and fix the problem. Is there a reason it tries to dup the filehandle? >
Admitedly, the code above is a bit of a kludge that I'm not sure works. I need to spend some time familiarizing myself with the Compress::Zlib 2.0 code as it is able to handle stream based compression much better than is currently supported. Steve Peters steve@fisharerojo.org
Download signature.asc
application/pgp-signature 191b

Message body not shown because it is not plain text.

Trying to clean up some RT tickets here. Is this still an issue? Does the latest revision fix the problem?