|Pathologically Eclectic Rubbish Lister|
Fresh Perl programmers often ask 'How do I hide my source?'. First of all do a perldoc -q 'hide the source' if You haven't read about it in the FAQs.
Question: Why is it bad to hide the source?
- doesn't work
- waste of time
Doesn't work because the Perl interpreter must read it and You can't snatch it at that point. Obfuscation of the code isn't a solution, You can use B::Deparse to see what is does, or You can use the Perl debugger.
Anyway reverse-engineering a software is legal in some countries (e. g. in Finland), if it is required for e. g. assuring interoperability between systems.
- "I don't want to give away my knowledge"
Nobody owns knowledge in fact. Programmers' real knowledge is the ability to construct non-trivial programs. It isn't in knowing some specific tricks or even knowing some specific algorithms. If people are buying customized applications, they typically expect to get full rights to the resulting code, anyway: source code, documentation everything.
- "I live by programming. If I give away the source I can't ask money for e. g. bugfixing?"
Charging for bugfixes is in fact illegal due to most countries sales laws. If You sell something for a price, they may demand it works. If your program is too buggy, they can require You to fix it or give their money back.
If You are a good programmer, write good code, You are cooperative and professional enough, customers will certainly use You for more than one project. On the other hand if You behave like a moron, encrypt your code, make sure code won't be reusable, act as if You don't trust the customer at all, etc, You certainly won't get even the first project. They can't ask the first best guy from the street to debug pro-level Perl code. If they had the time/ability to write the program they want, they wouldn't have hired You.