[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Making a runtime script



I presume that a runtime Perl program (given its size) is simply a copy of
the interpreter slightly modified to run a copy of the script embedded in
it ? Does it have to compile the script every time or is it the parse tree
etc. which is saved with the intrepreter (not a current concern, just an
idle query) ?

My current concern is that I want to install one script on a number of Macs
which don't (and won't) have MacPerl installed. This script "uses" several
modules - File::Copy, Macperl, and strict (thought I can skip script on the
distributed version - it's just to keep me honest :-)

However, whenever I tried to run such a runtime I got errors like "Can't
find strict.pm in @INC at line XX". I did a little spelunking and found out
(apologies if this is in TFM somewhere, as I did RTFM and I RTFB in its web
incarnation and I have seen nothing about this) that @INC for a runtime  =
a folder called lib in the runtime's folder. I copied all my used modules
in there but the runtime still didn't work because the modules used other
modules etc. (fleas ad infinitum, anyone ?). Eventually, I got all the
necessary modules installed and the runtime works (although I'm not sure -
I haven't yet been able to test it on a Mac which doesn't have MacPerl
installed).

However, it now looks like I'll have to distribute the runtime and this lib
folder I've made, which is much messier than I'd like. One thought which
occurs is to simply build one big source file and which I replace all "use
modules" by simply merging in the Perl code from the module files. Before I
try that (because it strikes me as a lot of manual editing) I'm asking the
list because I feel there must be a better way (and because I don't even
know if that will work).

BTW has anyone tried Malcolm Beattie's compiler yet with MacPerl ?


Kindest regards,


Niall  O Broin

UNIX Network Administrator               Ground Systems Engineering
Department
European Space Operations Centre         nobroin@esoc.esa.de
Darmstadt, Germany                 Ph./Fax  +49 6151 90 3619/2179



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch