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


in reply to Debugging Question

You don't say what your actual purpose in wanting to do this is, but I can guess that it's probably because the code contains something that you want to maintain restrictive intellectual property limitations on - trade secrets, copy prevention, whatever.

As the music and movie industries have (repeatedly) proven, this is simply not technically feasible, even if you're using languages which are less amenable to simple source inspection than Perl is. If anyone cares enough to use your software, then someone will also care enough to crack your "protection" or "rights management" or whatever you want to call it and, once that happens, they'll put the cracked version up for free download somewhere and people will have the choice of either paying to get the version that puts restrictions on their use or downloading the version that they can use however they like for free. Tough choice, eh?

The proper way to enforce these kinds of restrictions is to draw up a good contract and have enough lawyers on hand to sue anyone who breaches it. (Note that, by definition, a "good" contract is subject to review and negotiation by both parties prior to agreement. Shrinkwrap licenses, click-through EULAs, and the like are emphatically disqualified, not to mention that, if they were to be tested in court, they're probably unenforceable in many (most?) jurisdictions.)

Intellectual property is a purely legal fiction and can only be effectively protected by legal means. Trying to do it technologically is entirely futile and has no real effect beyond wasting both your and your customers' time and money.