Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

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.

Comment on PAR (pp) on lots of standalone scripts
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 (Chancellor) 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 (Prior) 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
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? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2014-09-22 11:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (189 votes), past polls