http://www.perlmonks.org?node_id=52441

r.joseph has asked for the wisdom of the Perl Monks concerning the following question:

New Boss, New Problems. My new (and already annoying) boss adamently does not believe in the GNU, GPL or any Free Software/Open Source licesening scheme. Yet, he wants a large project written entirely in Perl (which he knows is notoriously open source) and requires that we lock up the source code somehow.

My question is probably pretty obvious: is there any reliable way to encrypt/hide/lock/make-disapear-into-thin-air Perl source so that when the program or system is distributed, the source is entirely hidden from prying eyes?

I realize that Perl is inherently open source and that, because it is intrepreted and not compilied, it is fairly difficult to keep the source from others. But if I know anything about the Perl community, it is that no matter what it is, there is some way (usually more than one way) to do it :-). Thanks a bunch all!

R.Joseph

Replies are listed 'Best First'.
Re: Source Hiding
by chipmunk (Parson) on Jan 17, 2001 at 07:31 UTC
Re: Source Hiding
by dws (Chancellor) on Jan 17, 2001 at 07:41 UTC
    One well-known (though not always well liked) approach to this in the Enterprise market is to protect the code with NDAs and license agreements with confidentially and though-shalt-not-peek clauses. It doesn't really prevent anyone from seeing your source code, but it may give them second thoughts about doing anything untowards with it.
Re: Source Hiding
by elusion (Curate) on Jan 17, 2001 at 07:15 UTC
    There is one way that I could think of to do this: Distribute a binary version, using a program like perl2exe

    - p u n k k i d
    "Reality is merely an illusion, albeit a very persistent one." -Albert Einstein

Re: Source Hiding
by premchai21 (Curate) on Apr 05, 2001 at 00:43 UTC
    What about Bleach from CPAN? It might offer you a little protection. It converts your code into whitespace which actually contains the encoded source. If you then keep the use line in, the module will decode the source and run it when the program is run. I didn't think my program would run after I Bleached it, until it ran, correctly... but when I viewed it in the editor it was all white...

    ...of course someone intent at getting at the source could still modify Bleach to allow them to view it, but you can protect your source from that with a restrictive license (as others have suggested).