Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

PAR (pp) on lots of standalone scripts

by ajwood (Novice)
on Jan 28, 2011 at 14:16 UTC ( #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 (Pope) 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 (Bishop) 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.


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 ...


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://884824]
Approved by marto
and the pool shimmers...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (2)
As of 2017-09-21 23:00 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (254 votes). Check out past polls.