Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

PAR (pp) on lots of standalone scripts

by ajwood (Novice)
on Jan 28, 2011 at 14:16 UTC ( [id://884824]=perlquestion: print w/replies, xml ) Need Help??

ajwood has asked for the wisdom of the Perl Monks concerning the following question:

I'm using PAR to package a bunch of standalone scripts as part of a distribution. I have to admit, the motivation is purely to make the source code a little harder to get at. Something about what I'm done is striking me as a bit off though... Q: PAR (pp) packages *everything* (Perl interpreter, modules, etc.) in each executable it generates. Is there a smarter way to package the scripts? I can assume the target machine will have Perl installed.

Replies are listed 'Best First'.
Re: PAR (pp) on lots of standalone scripts
by Corion (Patriarch) on Jan 28, 2011 at 14:19 UTC

    I'd look at Acme::Bleach - it's the easiest way to hide your source code.

Re: PAR (pp) on lots of standalone scripts
by marto (Cardinal) on Jan 28, 2011 at 14:31 UTC
      I'm not looking to get rock-solid encryption, but rather just hide it from mildly curious eyes. I'm just concerned that using pp on everything balloons the installation size. Seems foolish to include a Perl interpreter and every module the script uses *for every script*.

        I was simply commenting on your suggestion of using pp to 'hide' the source, since it extracts everything on execution, and as I pointed out in the other thread I linked to, by default doesn't clean up after itself.

        Regarding size you may want to look at simply creating a PAR archive for each script, the topic of reducing bloat is discussed on the par site linked to previously. See also Re: Wisdom about "packaging" or transporting Perl apps from a previous discussion on a similar topic.

        Cheers

Re: PAR (pp) on lots of standalone scripts
by MidLifeXis (Monsignor) on Jan 28, 2011 at 14:33 UTC

    What about something like the "outer wrapper" approach.

    mytools oldcommand params

    mytools.exe would be the par package, and the rest of the scripts could be wrapped up in a module, or scripts included in the par package or ...

    --MidLifeXis

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://884824]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-04-19 23:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found