Manual Reference Pages - PPERL (3)
PPerl - Make perl scripts persistent in memory
$ pperl foo.pl
This program turns ordinary perl scripts into long running daemons, making
subsequent executions extremely fast. It forks several processes for each
script, allowing many proceses to call the script at once.
It works a lot like SpeedyCGI, but is written a little differently. I didnt
use the SpeedyCGI codebase, because I couldnt get it to compile, and needed
The easiest way to use this is to change your shebang line from:
To use pperl instead:
Like other persistent environments, this one has problems with things like
BEGIN blocks, global variables, etc. So beware, and try checking the mod_perl
guide at http://perl.apache.org/guide/ for lots of information that applies
to many persistent perl environments.
$ pperl <perl params> -- <pperl params> scriptname <script params>
The perl params are sent to the perl binary the first time it is started up.
See perlrun for details.
The pperl params control how pperl works. Try -h for an overview.
The script params are passed to the script on every invocation. The script
also gets any current environment variables, the current working directory,
and everything on STDIN.
In order to kill a currently running PPerl process, use:
pperl -- -k <scriptname>
You need to make sure the path to the script is the same as when it was invoked.
Alternatively look for a .pid file for the script in your tmp directory, and
kill (with SIGINT) the process with that PID.
The process does not reload when the script or modules change.
$^S is not represented identically with respect to perl, since your
script will be run within an eval block
Matt Sergeant, email@example.com. Copyright 2001 MessageLabs Ltd.
|perl v5.20.3 ||PPERL (3) ||2004-05-17 |
Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.