Subject: | $v might be undefined |
MIME-Version: | 1.0 |
X-Mailer: | MIME-tools 5.504 (Entity 5.504) |
Content-Disposition: | inline |
X-RT-Interface: | Web |
Message-ID: | <rt-4.0.18-15252-1463754837-1578.0-0-0@rt.cpan.org> |
Content-Type: | text/plain; charset="utf-8" |
Content-Transfer-Encoding: | binary |
X-RT-Original-Encoding: | utf-8 |
X-RT-Encrypt: | 0 |
X-RT-Sign: | 0 |
Content-Length: | 921 |
--- Spreadsheet/XLSX.pm 2015-10-31 03:33:19.000000000 +0100
+++ Spreadsheet/XLSX.pm 2016-05-20 16:28:34.612377628 +0200
@@ -111,7 +111,7 @@ sub _load_workbook {
} elsif (length($_) && $parsing_v_tag) {
my $v = $s ? $shared_info->{shared_strings}->[$_] : $_;
- if ($v eq "</c>") {
+ if (defined $v && $v eq "</c>") {
$v = "";
}
my $type = "Text";
@@ -134,7 +134,7 @@ sub _load_workbook {
$sheet->{MinRow} = $row if $sheet->{MinRow} > $row;
$sheet->{MinCol} = $col if $sheet->{MinCol} > $col;
- if ($v =~ /(.*)E\-(.*)/gsm && $type eq "Numeric") {
+ if (defined $v && $v =~ /(.*)E\-(.*)/gsm && $type eq "Numeric") {
$v = $1 / (10**$2); # this handles scientific notation for very small numbers
}