Subject: | Lots of "Use of uninitialized value" errors |
Date: | Mon, 25 Apr 2011 15:33:11 -0700 |
To: | bug-Spreadsheet-XLSX [...] rt.cpan.org |
From: | Ethan Brown <ethandbrown [...] gmail.com> |
First, my thanks for providing this module.
I found the module to print many errors of the form (test file attached).
Use of uninitialized value within @styles in hash element at
/usr/share/perl5/Spreadsheet/XLSX.pm line 189.
Use of uninitialized value $thisstyle in pattern match (m//) at
/usr/share/perl5/Spreadsheet/XLSX.pm line 190.
I tried checking for a defined $sty on line 189, and it fixed things
for this particular test file, however other files displayed the same
error. I found the following to fix the manifestation of the problem:
Replace
$thisstyle = $style_info{$styles[$sty]}
with
$thisstyle = $style_info{$styles[$sty]} if defined($sty) && $styles[$sty];
Hi hope you find this helpful.
--Ethan
Message body not shown because it is not plain text.