Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2024-04-24 11:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found