Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Dec 1995 18:17:43 -0700
From:      Nate Williams <nate@rocky.sri.MT.net>
To:        Terry Lambert <terry@lambert.org>
Cc:        questions@FreeBSD.ORG
Subject:   Re: undump program
Message-ID:  <199512190117.SAA25218@rocky.sri.MT.net>
In-Reply-To: <199512190036.RAA13127@phaeton.artisoft.com>
References:  <Pine.SUN.3.91.951218134608.26921B-100000@vegemite.Stanford.EDU> <199512190036.RAA13127@phaeton.artisoft.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Terry Lambert writes:
[ Using perl and undump to distribute a program ]

> It will not "compile" the perl program to a "binary".  It will make
> a copy of the existing perl interpreter, and fill out some auto
> data (including the default stack an PC).

Actually, since perl 'pre-compiles' code ahead of time, you will end up
with the pre-compiled perl binary (in it's internal state), which is
*much* faster to run since none of the error/syntax checking is done,
plus you get the added benefit of not needing the perl binary on your
distributed system.  (However, this is a moot point for any FreeBSD 2.X
system which comes with perl pre-installed).

However, if you are using Perl 5, it can make it easier for you to not
have to distribute a bunch of loadable modules if you 'core' the program
after all of them have been loaded.

> There is no significant advantage to this approach over restructuring
> your perl script based on splitting the precaclulation out to allow
> you to execute it only once and hard-code the results in the perl
> script.  The resulting "binary" will run at the same speed.

Wrong.

> The one potential advantage, "copy protection", is lost if anyone wants
> to take the trouble to take the core image data sections vs. a "standard"
> perl binary, and dump them out.  That is, the amount of effort to "crack"
> this is similar to the amount of effort necessary to make "undump" work.

Wrong.

If you don't know how perl does it's thing, don't assume it acts like
every other 'script' language you've used.

If I gave you an core/un-dumped perl program, you'd have almost as much
(possibly more) difficulty in trying to re-create it as you would trying
to re-create a C program from it's core image.


Nate




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199512190117.SAA25218>