Brian Baquiran wrote:
> 
> On Tue, 21 Mar 2000, Angelo Lorenzo wrote:
> 
> > Dear gurus,
> >
> > If I have two programs written for the same purpose
> > one created in C and the other one in PERL. After
> > compiling my program in C, it's just ok if I delete
> > the source code. But what about in Perl, how can I do
> > the same to hide the source code of my programs?
> 
> Lots of ways. There are (or should be) Perl compilers and
> converters. Look around on CPAN. You can dick around with
> file permissions. You can embed a Perl interpreter in a C program,
> and feed it mangled or encrypted source.
> 

The perl compiler is included with the perl distribution starting with
5.005.  However, it doesn't work.  I tried using it because I had a
really long script that took several seconds to compile on the fly, just
to speed things up.  Dunno where the trouble lies, but I was warned by
the docs that dragons lived in that part of the world...  Best solution
I think would be just for you to chmod the thing to 711 so only owner
has permissions to read/write but everyone has permission to execute. 
You could xor-encrypt the perl source and write a C program that
decrypts and interprets it at the same time (may need to use the
binfmt_misc feature of the kernel to do it).

> Myself, I rather like having source code around. One of the
> reasons I like scripting languages is that the source code is
> always there for you to debug.

True, very true.  Speeds up development and debugging substantially. 
Enables you to fix bugs on the fly.  Used it to advantage for all of my
perl projects.

-- 
------------------------------------------------------------------------
| Rafael R. Sevilla                                [EMAIL PROTECTED] |
|           Instrumentation, Robotics, and Control Laboratory          |
|    College of Engineering, University of the Philippines, Diliman    |
------------------------------------------------------------------------

-
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

Reply via email to