in reply to Closing Perl Source

Oh, good grief, not again.

This comes up with some regularity here. Go super search and enlighten yourself. And, to forestall the inevitable cascade of replies, the answers generally are:

  1. Heretic!
  2. Use Acme::Bleach
  3. There's perl2exe
    perl2exe isn't secure you ignorant wanker!
    yes it is
    No it isn't
    Well, that's not what it's for anyway
  4. B::Deparse will defeat any attempt at hiding source!

Short answer is no, it won't really work. Someone'll see the source, so throw a nasty license on it and hope for the best.

Replies are listed 'Best First'.
Re: Re: Closing Perl Source
by Anonymous Monk on Apr 02, 2003 at 18:29 UTC

    Good list, but you missed a couple:

    • Write it in C. You deserve it for even asking.
    • PAR! PAR! PAR! (repeat perl2exe comments)
    • Wait for parrot, somebody will write a native compiler for that.
    • Perl sux0rs, Java r0x0rs.

    and Here's my One True Answer:

    If you had to ask this question, you're not going to make any money off it. Save yourself the trouble, release the code, and benefit from other's input.

      I hope that nobody will claim PAR as "secure", or I'll be very embarassed.

      That said, for non-technical people the Zip format provided by PAR does construe as a way to 'hide' the source code -- at least from grep ;-).

        zgrep ;-)

        I'm not belgian but I play one on TV.

      I'll admit that at some early point in time, I too had wanted to "close" a perl-oriented script/program. I did the foresight of reading other people's attempts and saw that it wasn't a really good idea and if I wanted anything "closed", to just write it in C, even though good usage of strings and decompilers can get most of it out. Since then, I've never hid/closed anything I've written and I have gotten much more positive responses on all things I've ever written from those in the open source community. I even provide the source for things written in C, documentation and all.

      Bottom line, just share it. You'll find that the responses you'll get are much more open and helpful than if you try to "hide" an interpreted-language-oriented script.

      It's like the guy that wanted to write all of his shell scripts in perl. Everything on the system that ran in /bin/sh was converted to /usr/bin/perl...which promptly failed because /usr isn't mounted at boot time and hence, no perl binary is available. Just because it sounds like a good idea, doesn't mean it's anywhere near a good idea.

      The best way to hide perl code is to GPG encrypt it.
      Of course, it won't function in that state. But what's more important: code that works, or proprietary code?
      Hey! I like C! :-P

        You're a sick, sick man. ;-P

      Ha! This is on Best Nodes of the week! What's up with the moderation system?

        We have a comerical perl script that the boss doesnt not want to be floating around. I know how to write .NET code and some C. Is there any way to simply embed the perl or maybe just call through some kind of ASP page or Web Service so as to keep the code in our own hands. Don't kill me for asking how to swollow open source with the .NET monster, just trying to stay on the bosses good side... :-)