I don't have access to a Windows machine right now, I usually recomend running pp with the -x flag:
pp -x -o 1193701.exe 1193701.pl
On Linux I created example exes using pp with and without -x, as you can see there's differences in what is being packaged:
rwxrwxr-x 1 marto marto 149 Jun 27 16:31 1193701_oneline.pl -rwxrwxr-x 1 marto marto 148 Jun 27 16:31 1193701_twolines.pl -rwxr-xr-x 1 marto marto 3322431 Jun 27 16:32 oneline.exe -rwxr-xr-x 1 marto marto 3417012 Jun 27 16:32 oneline_x.exe -rwxr-xr-x 1 marto marto 3428235 Jun 27 16:34 twolines.exe -rwxr-xr-x 1 marto marto 3428929 Jun 27 16:34 twolines_x.exe
Note the different sizes. Runtime:
marto@netbook:~/perlmonks$ ./oneline.exe Can't locate Date/Calc.pm in @INC (you may need to install the Date::C +alc module) (@INC contains: /tmp/par-6d6172746f/cache-c93faf27fca57f9 +a6de63ed7af3cc18b152dad8a/inc/lib /tmp/par-6d6172746f/cache-c93faf27f +ca57f9a6de63ed7af3cc18b152dad8a/inc CODE(0x9ffa574) CODE(0x9ffa740)) +at script/1193701_oneline.pl line 4. BEGIN failed--compilation aborted at script/1193701_oneline.pl line 4. marto@netbook:~/perlmonks$ ./oneline_x.exe FINISHED marto@netbook:~/perlmonks$ ./twolines.exe FINISHED marto@netbook:~/perlmonks$ ./twolines_x.exe FINISHED
Clearly, the one line of use... example isn't packaging Date::Calc when called without the -x option. The good thing about the executables created is that they are zip archives you can extract and examine the differences. If I get time later I'll do some more digging, but this should be a reasonable avenue for investigation.
1193701_oneline.pl:
#!/usr/bin/perl use utf8; use 5.022; use strict; use List::Util qw(max); use Date::Cal +c qw(Delta_Days); say "FINISHED"; my $pause_here = <STDIN>;
1193701_twolines.pl
#!/usr/bin/perl use utf8; use 5.022; use strict; use List::Util qw(max); use Date::Calc qw(Delta_Days); say "FINISHED"; my $pause_here = <STDIN>;
In reply to Re: Very Odd Issue When Using pp to Create an .exe File Including Date::Calc
by marto
in thread Very Odd Issue When Using pp to Create an .exe File Including Date::Calc
by perldigious
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |