The
FAQ
seems to make a brief case, and then retire, perhaps because
this question is difficult to answer with confidence.
If you're willing to handle
a little uncertainty, and to do a bit more testing with the "secret" version of your
program to make sure things are working according to spec,
you could use
perlcc, the Perl-C compiler.
While not 100% complete, seems to work on most of the stuff
that I've thrown at it. It also seems to be the most practical,
as the Perl-JVM compiler, and Perl6 and such are not done yet.
Remember, though, that compiled scripts must be re-compiled
for each and every platform that they are to be run on.
If you're considering commercial sales of this program, that
list can be pretty darned long: Linux (libc6, glibc2, RedHat 7),
BSD, Solaris(Sparc,Intel), Windows, etc. You will have to
recompile, and test, on each of these.
The "old fashioned" way of achieving
same (i.e. "binary code" version of Perl script) was to
force Perl to
dump() a 'core' and convert the 'core' into an
executable using GNU
unexec. See the
dump()
link for more info. Of course, as that page says, this
may not actually work (at all).
A while back I came across a company that had ported their
"source protector" to work on Perl. What it basically did
was mangle variables, function names, and the like, into
line-noise-type random characters to try and obfuscate the
code automatically. It was still code, though, so it wouldn't
prevent anyone really determined to read it from doing so.
I other words, it prevented casual reading, but wasn't
an obstacle to serious efforts.