Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: many exe files rely on one library

by syphilis (Canon)
on Oct 14, 2012 at 01:50 UTC ( #998898=note: print w/ replies, xml ) Need Help??


in reply to many exe files rely on one library

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


Comment on Re: many exe files rely on one library
Download Code
Re^2: many exe files rely on one library
by Anonymous Monk on Oct 14, 2012 at 05:36 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://998898]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (18)
As of 2014-08-27 13:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (238 votes), past polls