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,