Subject: | Spreadsheet::ParseExcel::SaveParser doesn't pre-load Spreadsheet::ParseExcel |
The Spreadsheet::ParseExcel::SaveParser module doesn't work because it
fails to load Spreadsheet::ParseExcel.
The basic.t test doesn't catch this due to the ordering of the tests.
Attached is a patch for basic.t to highlight the problem and a patch for
SaveParser.pm to fix it.
John.
--
Subject: | basic_t.txt |
--- C:\Temp\Spreadsheet-ParseExcel-0.31\t\basic.t Thu May 3 03:18:32 2007 UTC
+++ C:\Temp\Spreadsheet-ParseExcel-0.32_patch\t\basic.t Tue Dec 9 23:59:00 2007 UTC
@@ -4,6 +4,11 @@
use Test::More tests => 8;
+SKIP: {
+ eval "use Spreadsheet::WriteExcel";
+ skip "Need Spreadsheet::WriteExcel for additional tests", 1 if $@;
+ use_ok('Spreadsheet::ParseExcel::SaveParser');
+}
use_ok('Spreadsheet::ParseExcel');
use_ok('Spreadsheet::ParseExcel::Dump');
@@ -23,11 +28,6 @@
use_ok('Spreadsheet::ParseExcel::FmtUnicode');
}
-SKIP: {
- eval "use Spreadsheet::WriteExcel";
- skip "Need Spreadsheet::WriteExcel for additional tests", 1 if $@;
- use_ok('Spreadsheet::ParseExcel::SaveParser');
-}
Subject: | saveparser_pm.txt |
--- C:\Temp\Spreadsheet-ParseExcel-0.31\lib\Spreadsheet\ParseExcel\SaveParser.pm Thu May 3 03:18:32 2007 UTC
+++ C:\Temp\Spreadsheet-ParseExcel-0.32_patch\lib\Spreadsheet\ParseExcel\SaveParser.pm Tue Dec 9 23:28:46 2007 UTC
@@ -7,9 +7,9 @@
#==============================================================================
# Spreadsheet::ParseExcel::SaveParser::Workbook
#==============================================================================
+use Spreadsheet::ParseExcel;
package Spreadsheet::ParseExcel::SaveParser::Workbook;
use strict;
-use warnings;
use base 'Spreadsheet::ParseExcel::Workbook';
our $VERSION = '0.06';
@@ -328,7 +328,6 @@
#==============================================================================
package Spreadsheet::ParseExcel::SaveParser::Worksheet;
use strict;
-use warnings;
use base 'Spreadsheet::ParseExcel::Worksheet';
our $VERSION = '0.06';
@@ -361,7 +360,6 @@
#==============================================================================
package Spreadsheet::ParseExcel::SaveParser;
use strict;
-use warnings;
use Spreadsheet::WriteExcel;
use base 'Spreadsheet::ParseExcel';