This is a simple patch, but it requires 5.10.
--- /usr/share/perl5/vendor_perl/Spreadsheet/XLSX.pm 2015-09-17 11:33:50.982004053 -0400
+++ XLSX.pm 2015-09-17 11:33:39.087002666 -0400
@@ -1,6 +1,6 @@
package Spreadsheet::XLSX;
-use 5.006000;
+use 5.010000;
use strict;
use warnings;
@@ -106,9 +106,9 @@
foreach ($member_workbook -> contents =~ /\<(.*?)\/?\>/g) {
- /^(\w+)\s+/;
+ /^(\w+)\s+/p;
- my ($tag, $other) = ($1, $');
+ my ($tag, $other) = ($1, ${^POSTMATCH});
my @pairs = split /\" /, $other;
--- /usr/share/perl5/vendor_perl/Spreadsheet/XLSX/Utility2007.pm 2015-09-17 11:33:46.646003205 -0400
+++ Utility2007.pm 2015-09-17 11:33:42.959001952 -0400
@@ -178,9 +178,9 @@
) {
$iFmtMode = 1 unless($iFmtMode);
if(substr($sFmtObj, $i, 1) =~ /[#0]/) {
- if(substr($sFmtObj, $i) =~ /^([#0]+)([\.]?)([0#]*)([eE])([\+\-])([0#]+)/){
- push @aRep, [substr($sFmtObj, $i, length($&)), $i, length($&)];
- $i +=length($&);
+ if(substr($sFmtObj, $i) =~ /^([#0]+)([\.]?)([0#]*)([eE])([\+\-])([0#]+)/p){
+ push @aRep, [substr($sFmtObj, $i, length(${^MATCH})), $i, length(${^MATCH})];
+ $i +=length(${^MATCH});
}
else{
if($iFflg==-1) {
@@ -218,9 +218,9 @@
$iFflg = -1;
}
elsif(substr($sFmtObj, $i, 3) =~ /^[eE][\+\-][0#]$/) {
- if(substr($sFmtObj, $i) =~ /([eE])([\+\-])([0#]+)/){
- push @aRep, [substr($sFmtObj, $i, length($&)), $i, length($&)];
- $i +=length($&);
+ if(substr($sFmtObj, $i) =~ /([eE])([\+\-])([0#]+)/p){
+ push @aRep, [substr($sFmtObj, $i, length(${^MATCH})), $i, length(${^MATCH})];
+ $i +=length(${^MATCH});
}
$iFflg = -1;
}
@@ -455,8 +455,8 @@
elsif($rItem->[0] eq '.') {
$sRep = '.';
}
- elsif($rItem->[0] =~ /^0+$/) {
- my $i0Len = length($&);
+ elsif($rItem->[0] =~ /^0+$/p) {
+ my $i0Len = length(${^MATCH});
#print "SEC:", $aTime[7], "\n";
$sRep = substr(sprintf("%.${i0Len}f", $aTime[7]/1000.0), 2, $i0Len);
}