I am having issues with compiling in Windows (Strawberry Perl v5.32.0) a script that references a custom module. My Perl skills could be rated as a 3/10 with 10 being the best and have researched this problem to the best of my ability.
When I run this, it runs fine and gives expected results:
pp -M PAR -M Mojolicious -C -a "C:\Strawberry\perl\site\lib\Mojo\resources\html_entities.txt;Mojo\resources\html_entities.txt" ^ -x -o testCorpProg.exe C:\Strawberry\Custom\new_corp_filing.pl
When I run the executable built, it gives me this:
Unable to open html entities file (C:\Users\perluser\AppData\Local\Temp\par-73636861707061\temp-10308\inc\lib\Mojo\resources\html_entities.txt): No such file or directory at C:\Users\perluser\AppData\Local\Temp\par-73636861707061\temp-10308\inc\lib/Mojo/Base.pm line 14. Compilation failed in require at C:\Users\perluser\AppData\Local\Temp\par-73636861707061\temp-10308\inc\lib/Mojo/Base.pm line 14. Compilation failed in require at C:\Users\perluser\AppData\Local\Temp\par-73636861707061\temp-10308\inc\lib/Mojo/DOM.pm line 2. BEGIN failed--compilation aborted at C:\Users\perluser\AppData\Local\Temp\par-73636861707061\temp-10308\inc\lib/Mojo/DOM.pm line 2. Compilation failed in require at C:\Users\perluser\AppData\Local\Temp\par-73636861707061\temp-10308\inc\lib/SubmitCorpFiling.pm line 11. BEGIN failed--compilation aborted at C:\Users\perluser\AppData\Local\Temp\par-73636861707061\temp-10308\inc\lib/SubmitCorpFiling.pm line 11. Compilation failed in require at script/new_corp_filing.pl line 3. BEGIN failed--compilation aborted at script/new_corp_filing.pl line 3.
The top of my custom module looks like this:
package SubmitCorpFiling;
use strict;
use warnings;
use LWP::UserAgent;
use Text::CSV_XS;
use Carp qw(carp croak cluck);
use File::Basename;
use URI::Query;
use Mojo::DOM;
use List::MoreUtils qw(any all firstval);
use Business::CreditCard qw(validate_card);
use JSON::PP qw(decode_json);
use Locale::SubCountry;
I have checked the PM install of Mojolicious and have the latest version installed (9.19). I am pretty sure the issue lay within that module (or Mojo::DOM).
cpan> install Mojolicious
Mojolicious is up to date (9.19).
I have my Windows environment PERL5LIB=C:\Strawberry\Custom\lib; C:\Strawberry\perl\site\lib; C:\Strawberry\perl\lib
Is there anyone who has experienced this issue and if so resolved it? Thank you in advance for any help!