As I mentioned on p5p earlier I am working on a low-tech way of bundling 
script + modules into one executable. 

e.g.

perl -MSerial ../foo > foo      # produce one script which has all perl code in
perl foo                        # just like ../foo but no @INC access
scipt2c foo                     # produces foo.exe
foo.exe                         # just like ../foo but no perl needed

Remaining snag is how to convert ..../Tk.so etc. into non-shared objects 
so that foo.exe is truely self contained.

foo.exe is straight forward  embedded perl executable with a big 

char script[] = ".................";

and does 
  argv[1] = "-e";
  argv[2] = script;

It mostly works (Solaris/Linux).

There are two potential module names - one for what is 'Serial' 
above which does equivalent job to -MO=... i.e. arranges for END/CHECK
block to save the things that %INC shows we need.

The other is the runtime module which does
*CORE::GLOBAL::require = \&reload;
and supplies eval's the text of the "file".

The name 'Serial' was just because it was originally going to serialized 
the execution. That turned out to be harder than I thought so now 
it just builds a hash of the file contents instead - but that makes 
name misleading (and it was not that good to start with).

The other module's working name is 'Reload'.
-- 
Nick Ing-Simmons

Reply via email to