Subject: | BUG: extract method fails under perl v5.20.1 |
Date: | Tue, 23 Jun 2015 14:20:02 +0000 |
To: | "bug-Archive-Extract [...] rt.cpan.org" <bug-Archive-Extract [...] rt.cpan.org> |
From: | Gary Bell <gary.bell [...] aero.bombardier.com> |
Hi,
I am using the Archive::Extract::extract() method to unzip a number of deflated zip files on Windows 7 64-bit machine. This code has worked for years under perl 5.16.3 and perl 5.18.4; but it now fails in perl version 5.20.1 with the following error message:
Setting $/ to a REGEXP reference is forbidden at C:/Strawberry/perl/vendor/lib/Archive/Extract.pm line 1114.
The problem is caused by the following line in Extract.pm:
local $/ = ON_WIN32 ? qr/\r?\n/ : "\n";
I am using the following strawberry perl versions:
This is perl 5, version 16, subversion 3 (v5.16.3) built for MSWin32-x64-multi-thread (** Works **)
This is perl 5, version 18, subversion 4 (v5.18.4) built for MSWin32-x64-multi-thread (** Works **)
This is perl 5, version 20, subversion 1 (v5.20.1) built for MSWin32-x64-multi-thread (** FAILS **)
The only global variables set before the call are:
$Archive::Extract::DEBUG = 0;
$Archive::Extract::PREFER_BIN = 1;
Unzip.exe binary is installed and working in d:\jenkins\utils\unzip.exe , module finds it OK according to $zipObject->bin_unzip
Thanks!
Best Regards,
Gary.