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

Re: many exe files rely on one library

by syphilis (Chancellor)
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 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.


Replies are listed 'Best First'.
Re^2: many exe files rely on one library
by Anonymous Monk on Oct 14, 2012 at 05:36 UTC

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://998898]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2018-06-19 09:52 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (113 votes). Check out past polls.