Spreadsheet-ParseExcel - error when creating executable with Spreadsheet::ParseExcel

Posted on Mon Apr 23 01:44:57 2007 by luna
error when creating executable with Spreadsheet::ParseExcel

I frequently use perl2exe to create perl-based executables that I can use at work without having to install Perl on every workstation. It just makes it simplier and portable.

My current project is more complex than previous scripts. This script uses Spreadsheet::ParseExcel to access spreadsheet information and uses the resulting data to move hundreds of files between directories. Specifically the script parses an Excel file and takes only the Cell->{Val} data from each cell in the spreadsheet. Further, each cell within the spreadsheet is strictly text. This implies I don't need the full range of capabilities of ParseExcel but so far it's the best tool for the job by far (many thanks to the developers).

The script works fine when using the Perl interpreter but I encounter an error at runtime after the executable is created using Perl2exe and/or PAR.

Error =

"Couldn't load any math lib, not even 'Calc.pm' at Perl2EXE_STORAGE/OLE/STORAGE_LITE.pm line 13. BEGIN failed--compliation aborted at PERL2EXE_Storage/OLE/Storage_Lite line 13. BEGIN failed--compliation aborted at PERL2EXE_Storage/Spreadsheet/ParseExcel.pm line 176"

Line 13 of Storage_Lite is simply:

use Math::BigInt;

Line 176 of ParseExcel appears to be a reference to a hash. The first use of the Storage_Lite module occurs a few lines later.

All modules have been installed with PPM.

Has anyone ever come across this problem before or have any potential solutions?

I think the problem is with Math:BigInt. Even this simple program below fails when I try to run the executable created with Perl2exe.

use strict; use warnings; use Math::BigInt; print "okfine";

The executable is created but it displays the same error as above sans the message about ParseExcel. When use Math::BigInt is replaced with require Math::BigInt; the resulting executable is ok. This does not work when the Storage_Lite reference is changed to require Math::BigInt however.

Any help you can shed would be appreciated.

philc

Direct Responses: 4989 | 4990 | 4998 | 7886 | Write a response