in reply to Saving parsed perl for faster loading?

In some instances you can use perlcc to create a compiled version of your program, although, according to the documentation, "Use for production purposes is strongly discouraged." Experimental code and all that. It's worth a try, if you're really desperate, since it ends up being compiled code.

If this program is used on a semi-regular basis, you could always leave it running as a "daemon" process, allowing other programs to call it as required using a socket. This isn't as risky, but you should have a good example of how to make a daemon process handy, for example, from the Perl Cookbook. A cheap way of doing this is to turn it into an Apache module, where it can be accessed using HTTP.
  • Comment on Re: Saving parsed perl for faster loading?

Replies are listed 'Best First'.
Re: Re: Saving parsed perl for faster loading?
by bart (Canon) on Dec 01, 2003 at 15:56 UTC
    If this program is used on a semi-regular basis, you could always leave it running as a "daemon" process, allowing other programs to call it as required using a socket. This isn't as risky, but you should have a good example of how to make a daemon process handy, for example, from the Perl Cookbook. A cheap way of doing this is to turn it into an Apache module, where it can be accessed using HTTP.
    A simpler way would be to use pperl, short for "persistent perl", which, to my understanding, pretty much works in the way you describe.

    As for making it work on Windows: the only report of a successful build on Windows, is using Cygwin — only, even that is for a very old version: 0.02. Build status reports for ActivePerl (5.6, 5.8) don't look good at all.