PerlApp DateTime::Format::ISO8601

Posted by alodar on 2016-06-10 09:25

In an effort to compile a larger script I was running an error after running the compiled executable. I have narrowed it down to the use of the DateTime::Format::ISO8601. As such I have a script that just has the use of that module in it and nothing else:

use DateTime::Format::ISO8601;

If I put this into PerlApp i get the following error:

The following parameter was passed in the call to DateTime::Format::Builder::Parser::create_single_parser but was not listed in the validation options: regex
at /DateTime/Format/Builder/Parser.pm line 164.
DateTime::Format::Builder::Parser::create_single_parser(undef, "params", ARRAY(0x4f6f730), "length", ARRAY(0x4f6f6d0), "postprocess", ARRAY(0x4f6f820), "regex", qr(^ T?? (\d\d) (\d\d) (\d\d) $)x, ...) called at /DateTime/Format/Builder/Parser.pm line 305
DateTime::Format::Builder::Parser::sort_parsers("DateTime::Format::Builder::Parser", HASH(0x3ed91b0), ARRAY(0x3ed7838)) called at /DateTime/Format/Builder/Parser.pm line 228
DateTime::Format::Builder::Parser::create_multiple_parsers("DateTime::Format::Builder::Parser", HASH(0x3ed91b0), HASH(0x4f6f898), HASH(0x4f6fad8), HASH(0x4f6fd00), HASH(0x4f6ff10), HASH(0x4f70108), HASH(0x4f70368)) called at /DateTime/Format/Builder/Parser.pm line 363
DateTime::Format::Builder::Parser::create_parser("DateTime::Format::Builder::Parser", ARRAY(0x3ed30a8), HASH(0x4f6f898), HASH(0x4f6fad8), HASH(0x4f6fd00), HASH(0x4f6ff10), HASH(0x4f70108), HASH(0x4f70368)) called at /DateTime/Format/Builder.pm line 122
DateTime::Format::Builder::create_parser("DateTime::Format::Builder", ARRAY(0x4f703f8)) called at /DateTime/Format/Builder.pm line 132
DateTime::Format::Builder::create_end_parser("DateTime::Format::Builder", ARRAY(0x4f703f8)) called at /DateTime/Format/Builder.pm line 78
DateTime::Format::Builder::create_class(undef, "parsers", HASH(0x4f704b8)) called at /DateTime/Format/ISO8601.pm line 173
eval ';' called at perlapp line 831
PerlApp::safe_eval() called at PerlApp/myrequire.pl line 102
PerlApp::my_require("DateTime/Format/ISO8601.pm") called at crypttest.001 - Copy.pl line 2
main::BEGIN() called at /DateTime/Format/ISO8601.pm line 0
eval {...} called at /DateTime/Format/ISO8601.pm line 0
BEGIN failed--compilation aborted at crypttest.001 - Copy.pl line 2.

I have tried to add DateTime, and DateTime::Format::ISO8601 to the add path, and I have tried adding everything under DateTime::Format::ISO8601, Params::Validate::XS, and Params::Validate::PP to the bind file listing. I keep getting the same error. My assumption is that there is something being calculated at runtime that I need to add as a bind or module but I am having no luck. I would swap out the DateTime::Format::ISO8601 module but its used as part of another CPAN module.

Anyone else run into this with PerlApp and DateTime::Format::ISO8601?

Environment
---------------------
Windows 2008 Server
ActiveState Perl v5.22.1
PerlApp 9.5.1

Thanks

harryc | Mon, 2018-08-20 02:04

Hi i have the same problem with this code

#!/usr/bin/perl -w
use strict;
use DateTime::Format::ISO8601;
use DateTime::Format::Strptime;
use Data::Dumper;
my $di = DateTime::Format::ISO8601->parse_datetime('2018-08-20T06:43:50.330Z');
my $dv = DateTime::Format::ISO8601->parse_datetime('2018-08-20T06:46:56.147Z');
my $delta = $dv - $di;
print Dumper $delta;

Did you find a solution ?
Thks Harry C
ERROR:
DateTime/Format/Builder/Parser.pm line 164. DateTime::Format::Builder::Parser::create_single_parser(undef, 'params', 'ARRAY(0x297e3dc)', 'length', 8, 'regex', 'Regexp=REGEXP(0x479be24)') called at /

DateTime/Format/Builder/Parser.pm line 305 DateTime::Format::Builder::Parser::sort_parsers('DateTime::Format::Builder::Parser', 'HASH(0x479372c)', 'ARRAY(0x4790cb4)') called at /

DateTime/Format/Builder/Parser.pm line 228 DateTime::Format::Builder::Parser::create_multiple_parsers('DateTime::Format::Builder::Parser', 'HASH(0x479372c)', 'HASH(0x479be04)', 'HASH(0x479bee4)', 'HASH(0x479bf94)', 'HASH(0x479c034)', 'HASH(0x479c0e4)', 'HASH(0x479c204)', 'HASH(0x479c314)', ...) called at /

DateTime/Format/Builder/Parser.pm line 362 DateTime::Format::Builder::Parser::create_parser('DateTime::Format::Builder::Parser', 'ARRAY(0x478cf1c)', 'HASH(0x479be04)', 'HASH(0x479bee4)', 'HASH(0x479bf94)', 'HASH(0x479c034)', 'HASH(0x479c0e4)', 'HASH(0x479c204)', 'HASH(0x479c314)', ...) called at /<\datetimeproblem.exe>DateTime/Format/Builder.pm line 122 DateTime::Format::Builder::create_parser('DateTime::Format::Builder', 'ARRAY(0x47a2c04)') called at /<\datetimeproblem.exe>DateTime/Format/Builder.pm line 132 DateTime::Format::Builder::create_end_parser('DateTime::Format::Builder', 'ARRAY(0x47a2c04)') called at /

DateTime/Format/Builder.pm line 78 DateTime::Format::Builder::create_class(undef, 'parsers', 'HASH(0x47a38fc)') called at /<\datetimeproblem.exe>DateTime/Format/ISO8601.pm line 173 eval '' called at perlapp line 831 PerlApp::safe_eval() called at PerlApp/myrequire.pl line 102 PerlApp::my_require('DateTime/Format/ISO8601.pm') called at datetimeproblem.pl line 3 main::BEGIN() called at /<\datetimeproblem.exe>DateTime/Format/ISO8601.pm line 0 eval {...} called at /<\datetimeproblem.exe>DateTime/Format/ISO8601.pm line 0 BEGIN failed--compilation aborted at datetimeproblem.pl line 3.