Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id:
90854
Status:
open
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
mkmetw [...] hotmail.com
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
(no value)



Subject: Test 17 in t/03_ex.t is failing
Date: Wed, 27 Nov 2013 13:55:27 +0000
To: "bug-Archive-Zip@rt.cpan.org" <bug-archive-zip@rt.cpan.org>
From: Manoj Kumar <mkmetw@hotmail.com>
Hi,

I am trying to install Archive::Zip 1.33 and test number 17 in t/03_ex.t is failing.

For details, please see http://cpantesters.org/cpan/report/2a2ecfda-33b0-1015-b43a-c9c9a0cab74a.

If I close the file handle passed to Archive::Zip::_newFileHandle, the test is passing.

The modification needed is -

--- lib/Archive/Zip.pm.orig     2013-11-10 04:47:27.000000000 +0100
+++ lib/Archive/Zip.pm  2013-11-27 14:40:54.095625000 +0100
@@ -424,9 +424,13 @@
     if ( ref($fd) ) {
         if ( _ISA($fd, 'IO::Scalar') or _ISA($fd, 'IO::String') ) {
             $handle = $fd;
-        } elsif ( _ISA($fd, 'IO::Handle') or ref($fd) eq 'GLOB' ) {
+        } elsif ( _ISA($fd, 'IO::Handle') ) {
             $handle = IO::File->new;
             $status = $handle->fdopen( $fd, @_ );
+        } elsif ( ref($fd) eq 'GLOB' ) {
+            $handle = IO::File->new;
+            $status = $handle->fdopen( $fd, @_ );
+            close $fd;
         } else {
             $handle = $fd;
         }

Regards,

Subject: Re: [rt.cpan.org #90854] Test 17 in t/03_ex.t is failing
Date: Wed, 27 Nov 2013 13:13:52 -0800
To: bug-Archive-Zip@rt.cpan.org
From: Fred Moyer <fred@redhotpenguin.com>
I don't really understand why you have to close $fd if the handle is a glob. How did you determine this fix is necessary? On Wed, Nov 27, 2013 at 5:55 AM, Manoj Kumar via RT <bug-Archive-Zip@rt.cpan.org> wrote:
Show quoted text
> Wed Nov 27 08:55:44 2013: Request 90854 was acted upon. > Transaction: Ticket created by mkmetw@hotmail.com > Queue: Archive-Zip > Subject: Test 17 in t/03_ex.t is failing > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: mkmetw@hotmail.com > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=90854 > > > > Hi, > > I am trying to install Archive::Zip 1.33 and test number 17 in t/03_ex.t is failing. > > For details, please see http://cpantesters.org/cpan/report/2a2ecfda-33b0-1015-b43a-c9c9a0cab74a. > > If I close the file handle passed to Archive::Zip::_newFileHandle, the test is passing. > > The modification needed is - > > --- lib/Archive/Zip.pm.orig 2013-11-10 04:47:27.000000000 +0100 > +++ lib/Archive/Zip.pm 2013-11-27 14:40:54.095625000 +0100 > @@ -424,9 +424,13 @@ > if ( ref($fd) ) { > if ( _ISA($fd, 'IO::Scalar') or _ISA($fd, 'IO::String') ) { > $handle = $fd; > - } elsif ( _ISA($fd, 'IO::Handle') or ref($fd) eq 'GLOB' ) { > + } elsif ( _ISA($fd, 'IO::Handle') ) { > $handle = IO::File->new; > $status = $handle->fdopen( $fd, @_ ); > + } elsif ( ref($fd) eq 'GLOB' ) { > + $handle = IO::File->new; > + $status = $handle->fdopen( $fd, @_ ); > + close $fd; > } else { > $handle = $fd; > } > > Regards, > >
CC: <SMPETERS@cpan.org>
Subject: Re: [rt.cpan.org #90854] Test 17 in t/03_ex.t is failing
Date: Wed, 27 Nov 2013 23:03:30 +0100
To: <bug-Archive-Zip@rt.cpan.org>
From: Manoj Kumar <mkmetw@hotmail.com>
Hi, It seems that after the _newFileHandle call, the temp file has two file descriptors opened on it. Then one of them is closed (the one returned by this call) in Archive::Zip::Archive::overWriteAs. Later in this sub, when you try to rename the temp file, it fails because the temp file is still open. If you need I can send you the pl file where I isolated and reproduced the problem. Regards,
Show quoted text
--- Original Message --- From: "fred@redhotpenguin.com via RT" <bug-Archive-Zip@rt.cpan.org> Sent: 27 November 2013 22:14 To: mkmetw@hotmail.com Cc: SMPETERS@cpan.org Subject: Re: [rt.cpan.org #90854] Test 17 in t/03_ex.t is failing <URL: https://rt.cpan.org/Ticket/Display.html?id=90854 > I don't really understand why you have to close $fd if the handle is a glob. How did you determine this fix is necessary? On Wed, Nov 27, 2013 at 5:55 AM, Manoj Kumar via RT <bug-Archive-Zip@rt.cpan.org> wrote:
> Wed Nov 27 08:55:44 2013: Request 90854 was acted upon. > Transaction: Ticket created by mkmetw@hotmail.com > Queue: Archive-Zip > Subject: Test 17 in t/03_ex.t is failing > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: mkmetw@hotmail.com > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=90854 > > > > Hi, > > I am trying to install Archive::Zip 1.33 and test number 17 in t/03_ex.t is failing. > > For details, please see http://cpantesters.org/cpan/report/2a2ecfda-33b0-1015-b43a-c9c9a0cab74a. > > If I close the file handle passed to Archive::Zip::_newFileHandle, the test is passing. > > The modification needed is - > > --- lib/Archive/Zip.pm.orig 2013-11-10 04:47:27.000000000 +0100 > +++ lib/Archive/Zip.pm 2013-11-27 14:40:54.095625000 +0100 > @@ -424,9 +424,13 @@ > if ( ref($fd) ) { > if ( _ISA($fd, 'IO::Scalar') or _ISA($fd, 'IO::String') ) { > $handle = $fd; > - } elsif ( _ISA($fd, 'IO::Handle') or ref($fd) eq 'GLOB' ) { > + } elsif ( _ISA($fd, 'IO::Handle') ) { > $handle = IO::File->new; > $status = $handle->fdopen( $fd, @_ ); > + } elsif ( ref($fd) eq 'GLOB' ) { > + $handle = IO::File->new; > + $status = $handle->fdopen( $fd, @_ ); > + close $fd; > } else { > $handle = $fd; > } > > Regards, > >


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.