2

PerlApp generate perl script to executable. I get a problem using the PerlApp Here are the steps:

  1. Generate a perl script (e.pl) with the following 2 lines require Date::Manip; require Date::Manip::DM6;
  2. perlapp e.pl --add Date::Manip --add Date::Manip::DM6
  3. e.exe generate the following errors: c:_test>e.exe ERROR LOADING MODULE: Date::Manip::DM6 at /Date/Manip.pm line 35.
user3586164
  • 155
  • 1
  • 1
  • 10

2 Answers2

3

You need to add more than just Date::Manip::DM6:

perlapp --add Date::Manip::** e.pl

The wildcards indicate that all submodules in the Date::Manip namespace should be added, including some that are more than 1 level down. The error is because DM6 depends on these other submodules, some of which seem to be implicit.

Also you don't need to require Date::Manip::DM6 as that is not how you're meant to use the module. Version 6 is used automatically depending on your version of perl, which gets included in your compiled exe.

stevenl
  • 6,736
  • 26
  • 33
1

Just in case you're suffering from an XY Problem:

Considering using pp instead of PerlApp. The following works just fine:

use strict;
use warnings;

use Date::Manip;

print "Hello World\n";

And then packaging:

pp hello_date.pl
Community
  • 1
  • 1
Miller
  • 34,962
  • 4
  • 39
  • 60
  • Thanks!. I had problem install PAR::Packer on my window 7 system. I run out of time on this topic. So, I pick the paid solution. – user3586164 May 21 '14 at 15:39