Subject: | Error message "Parser for XLS is not installed at XXXX" when packaging with PAR::Packer |
Hello,
I'm trying to package Spreadsheet::Read with PAR::Packer to use the module on a system that doesn't have perl installed (a debian 8 box). It creates a executable that includes my script (attached) and its dependencies. When running the executable, I have the error message "Parser for XLS is not installed at script/test_xls.pl line 5."
Here is what I've done :
cpan install PAR::Packer PAR Spreadsheet::Read Spreadsheet::ParseExcel
pp -M Spreadsheet::** test_xls.pl -o test_xls
[scp the excel file to the target machine and run the executable]
./test_xls
error : Parser for XLS is not installed at script/test_xls.pl line 5
The line that trigger the error is here https://metacpan.org/source/HMBRAND/Spreadsheet-Read-0.70/Read.pm#L581
On my computer (not the target machine) the scripts works fine.
So Spreadsheet::Read seems to fail to find Spreadsheet::ParseExcel, although this module is present in the executable (you can unzip the executable to see what's in it).
So what Spreadsheet::Read needs to find Spreadsheet::ParseExcel and run it?
Regards,
Vincent
Subject: | test_xls.pl |
use strict;
use Spreadsheet::Read;
use warnings;
my $book = Spreadsheet::Read->new('test.xls', 'attr' => 1, parser => 'xls');