momo33 has asked for the wisdom of the Perl Monks concerning the following question:

Hello Perlmonks,

This may be an ActiveStatePerl issue, not Perl. I asked them, but I have no idea when they respond. So I would like to ask you.

I have a problem with DateTime and PerlApp. My script runs fine with the Perl interpreter, no errors. Unfortunately it fails when I pack it with PerlApp. Does anyone know where to start searching? Thank you for any help!
#!/usr/bin/perl use DateTime; my $now = DateTime->now(); print "$now\n"; C:\Rr>test1 Can't locate DateTime/Locale/en_US.pm in @INC (@INC contains:) at (eva +l 915) line 3. BEGIN failed--compilation aborted at envision_test1.pl line 9. Perl: AS 5.10.0 build 1005 DateTime: 0.50 PerlApp: 7.2.0

Replies are listed 'Best First'.
Re: DateTime and PerlApp
by Khen1950fx (Canon) on Jul 01, 2009 at 06:01 UTC
    It's not an ActiveState issue, but an omission in your script.

    #!/usr/bin/perl use DateTime; my $now = DateTime->now( locale => 'en_US' ); print "$now\n";
Re: DateTime and PerlApp
by Anonymous Monk on Jul 01, 2009 at 09:39 UTC
      This solved part of the problem. Thank you. As you will understand, this was not the real issue. The problem-script is a rather large one (140kB).

      When the script packed with perlapp is started, the output is:
      $ ./test The following parameter was passed in the call to DateTime::Format::Bu +ilder::Parser::create_single_parser but was not listed in the validat +ion options: params at /</home/momo/test>DateTime/Format/Builder/Parser.pm line 311 DateTime::Format::Builder::Parser::create_single_parser(undef, 'pa +rams', 'ARRAY(0xa7b1440)', 'length', 'ARRAY(0xa7b3bf0)', 'postprocess +', 'CODE(0xa7c3100)', 'regex', 'Regexp=SCALAR(0xa7b3e20)', ...) calle +d at /</home/momo/test>DateTime/Format/Builder/Parser.pm line 501 DateTime::Format::Builder::Parser::sort_parsers('DateTime::Format: +:Builder::Parser', 'HASH(0xa4f4650)', 'ARRAY(0xa4f3c10)') called at / +</home/momo/test>DateTime/Format/Builder/Parser.pm line 397 DateTime::Format::Builder::Parser::create_multiple_parsers('DateTi +me::Format::Builder::Parser', 'HASH(0xa4f4650)', 'HASH(0xa7b3e40)', ' +HASH(0xa7b4450)', 'HASH(0xa7b9368)', 'HASH(0xa20b008)', 'HASH(0xa20b1 +c8)', 'HASH(0xa7d0870)', 'HASH(0xa7d0950)', ...) called at /</home/mo +mo/test>DateTime/Format/Builder/Parser.pm line 600 DateTime::Format::Builder::Parser::create_parser('DateTime::Format +::Builder::Parser', 'ARRAY(0xa635f30)', 'ARRAY(0xa7b3a60)', 'HASH(0xa +7b3e40)', 'HASH(0xa7b4450)', 'HASH(0xa7b9368)', 'HASH(0xa20b008)', 'H +ASH(0xa20b1c8)', 'HASH(0xa7d0870)', ...) called at /</home/momo/test> +DateTime/Format/Builder.pm line 156 DateTime::Format::Builder::create_parser('DateTime::Format::Builde +r', 'ARRAY(0xa80fab8)') called at /</home/momo/test>DateTime/Format/B +uilder.pm line 174 DateTime::Format::Builder::create_end_parser('DateTime::Format::Bu +ilder', 'ARRAY(0xa80fab8)') called at /</home/momo/test>DateTime/Form +at/Builder.pm line 104 DateTime::Format::Builder::create_class(undef, 'parsers', 'HASH(0x +a51d450)') called at /</home/momo/test>DateTime/Format/Flexible.pm li +ne 238 eval '' called at perlapp line 810 PerlApp::safe_eval() called at perlapp line 900 PerlApp::my_require('DateTime/Format/Flexible.pm') called at test. +pl line 105 main::BEGIN() called at /</home/momo/test>DateTime/Format/Flexible +.pm line 0 eval {...} called at /</home/momo/test>DateTime/Format/Flexible.pm + line 0 BEGIN failed--compilation aborted at test.pl line 105. Line 105: use DateTime::Format::Flexible;
      Any suggestions on how to fix it?
        Please provide shortest program possible that will replicate that error, and perlapp command used, so that we can try to help.