From: "Chas. Owens" <chas.ow...@gmail.com>
The only way to truly hide code is to not give the code to the person
you don't want to see it. Even languages like C have decompilers. If
you truly need to prevent people from seeing code, then your only real
option is to run a server and distribute a client that connects to the
server. If all you need to is to discourage casual lookers from
seeing the source, then you only need something like Acme::Bleach.
Yes, you can unbleach the code, but it takes effort and knowledge and
with those no code is safe behind any form of obfuscation (including
compilation to binary).
If you are trying to hide the code because you are distributing
secrets (like passwords, api keys, etc) in your code, then you have a
fundamental design issue that needs to be fixed.
Decompiling C/C++/asm code in a form that can be re-compiled again is hard
to do for most programmers.
Finding/unhiding the provided Perl code is not as hard.
So the real answer is that if the protection of the source code is so
important, then Perl is not an appropriate programming language for this,
because it doesn't have a way of compiling the code and storing it in files
that can be distributed and ran by the final users. C/C++/Java/C# or even Go
or Python are better for this.
As far as I know, perlcc never really worked for complex programs. It might
work for Hello, world programs, but not fore more, so it is not a solution
either.
ActiveState PDK could be a good enough solution for hiding the source code,
but it is not a very clean solution that works well for any kind of
programs, and it doesn't compile the code.
Creating web-based apps that run on a server might not be a solution either,
because in some cases a local (desktop) app with a OS native interface is
needed.
Perl still has its advantages, but not for compiling/hiding code and for
distributing the programs to final users, and because it is used less and
less for new projects, probably it will never have that kind of advantage
unfortunately.
Other people used to recommend to distribute a license and put the loyers
sue those that don't respect it, but it is obvious that this is not a
solution either.
Perl is good only when is not necessary to hide the code, for example for
very complex web-based apps that can't be replaced with an already-made free
CMS, or for special programs that run on a server by a cron job, but not for
applications ran by common users on their desktop computers.
...unfortunately.
--Octavian
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/