I'm wondering if there's a way to capture the opcodes that Perl uses to execute a program. Then, once those are captured, to run those opcodes without having to go through the entire compile step again. I'd sorta like to do this for a program that runs over and over on the same data set (it's a CGI program) and doesn't change.

Or, is there a better way of doing this? Please note that I cannot use mod_perl on this assignment.

Replies are listed 'Best First'.
(MeowChow) Re: Opcodes and Interpreters...
by MeowChow (Vicar) on Jul 24, 2001 at 20:39 UTC
    CGI::SpeedyCGI is what you're looking for. It's a poor man's mod_perl, that doesn't require any Apache voodoo.
       MeowChow                                   
                   s aamecha.s a..a\u$&owag.print
Re: Opcodes and Interpreters...
by bikeNomad (Priest) on Jul 24, 2001 at 19:49 UTC
    Apparently you can do this; look at B::Bytecode and B and B::byteload_fh which allows you to load bytecodes from a filehandle.
Re: Opcodes and Interpreters...
by princepawn (Parson) on Jul 24, 2001 at 20:29 UTC
    I think you are thinking about this problem at too low a level and need to look at a CGI caching module such as (you guessed it!) CGI::Cache.
(ichimunki) Re: Opcodes and Interpreters...
by ichimunki (Priest) on Jul 24, 2001 at 19:26 UTC
Re: Opcodes and Interpreters...
by John M. Dlugosz (Monsignor) on Jul 25, 2001 at 00:27 UTC
    If I can offer yet another way to do it, check out Windows Scripting Components. Basically, make a Perl script into a COM server. It runs in its own process, and can have a life that is independant of its caller.