Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Is it possible to have pp create an exe file that packs in *only* the code that's contained in your script ?
Such an executable would need to be able to find perl on the local machine - so you would need to install perl on all client machines, then distribute this "minimalist" executable that has packed in only your code and pulls in the perl that has been installed.

If pp doesn't already provide this capability, then I think it's a feature that might be worth adding. FAIK, this might not even be do-able. (Or, it might even amount to being the same thing as distributing the script as is :-)

Looking at the docs (as I don't actually have PAR::Packer installed) I wonder if pp -S -o hello.exe hello.pl does precisely what I'm suggesting ?
I'm guessing it doesn't, but it's not hard to check. Just create an executable (from the simplest of perl scripts) using that command, check that the exe runs on your machine, then remove Perl from your path and see if the exe still works. If the exe still works, then obviously it must contain perl within it ... which is *not* what we're looking for.

Cheers,
Rob

In reply to Re: many exe files rely on one library by syphilis
in thread many exe files rely on one library by xiaoyafeng

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 romping around the Monastery: (6)
As of 2024-04-24 08:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found