-
-
17 May 2004 14:35:23 UTC
- Distribution: PPerl
- Module version: 0.25
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (13)
- Testers (81 / 320 / 0)
- Kwalitee
Bus factor: 0- % Coverage
- License: unknown
- Activity
24 month- Tools
- Download (22.02KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- unknown
- Reverse dependencies
- CPAN Testers List
- Dependency graph
Take me over?
The maintainer of this distribution is looking for someone to take over! If you're interested then please contact them via email.NAME
PPerl - Make perl scripts persistent in memory
SYNOPSIS
$ pperl foo.pl
DESCRIPTION
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 didn't use the SpeedyCGI codebase, because I couldn't get it to compile, and needed something ASAP.
The easiest way to use this is to change your shebang line from:
#!/usr/bin/perl -w
To use pperl instead:
#!/usr/bin/pperl -w
WARNINGS
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.
Parameters
$ 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.
Killing
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.
BUGS
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
AUTHOR
Matt Sergeant, matt@sergeant.org. Copyright 2001 MessageLabs Ltd.
SEE ALSO
Module Install Instructions
To install PPerl, copy and paste the appropriate command in to your terminal.
cpanm PPerl
perl -MCPAN -e shell install PPerl
For more information on module installation, please visit the detailed CPAN module installation guide.