Subject: | Warnings in test suite |
Date: | Wed, 17 Dec 2008 18:05:06 +0100 |
To: | bug-Spreadsheet-XLSX [...] rt.cpan.org |
From: | gregor herrmann <gregoa [...] debian.org> |
Hi Dmitry,
the test suite of Spreadsheet-XLSX throws a lot of "Use of
uninitialized value ..." warnings in lib/Spreadsheet/XLSX.pm line 63
if $formatCode or $default don't exist (because of a missing $1, if I
understand the code correctly).
The following patch gets rid of the warning, although I'm not sure if
it changes anything as a side effect:
--- a/lib/Spreadsheet/XLSX.pm
+++ b/lib/Spreadsheet/XLSX.pm
@@ -59,7 +59,7 @@
foreach my $t1 (@styles){
$member_styles -> contents =~ /numFmtId="$t1" formatCode="([^"]*)/;
- my $formatCode=$1;
+ my $formatCode=$1 || '';
if ($formatCode eq $default || not($formatCode)){
if ($t1 == 9 || $t1==10){ $formatCode="0.00000%";}
elsif ($t1 == 14){ $formatCode="m-d-yy";}
@@ -68,7 +68,7 @@
}
}
$style_info{$t1} = $formatCode;
- $default=$1;
+ $default=$1 || '';
}
}
Please consider looking into this issue.
Cheers,
gregor (Debian Perl Group)
--
.''`. Home: http://info.comodo.priv.at/{,blog/} / GPG Key ID: 0x00F3CFE4
: :' : Debian GNU/Linux user, admin, & developer - http://www.debian.org/
`. `' Member of VIBE!AT, SPI Inc., fellow of FSFE | http://got.to/quote/
`- NP: Queen: Let Me Entertain You
Message body not shown because it is not plain text.