README for mod_perl.c, mod_perl_fast.c, and Apache.xs These are Apache modules that embed a perl interpreter in the HTTP server. The benefit of this is that we are able to run scripts without going through the expensive (fork/exec/parameter passing/parsing, etc.) CGI interface. The scripts will run faster and they have direct access to the C API of the server. The current approach of mod_perl is to allocate and construct a new perl interpreter for each request. The interpreter will then parse and run a perl script and we finally destruct the perl interpreter in order to free memory consumed. The current approach of mod_perl_fast is to allocate and contruct one perl interpreter when the server starts. At the same time, load, parse and run one perl script, which may pull in other perl code such as your favorite modules. This also allows you to initiate persistent connections such as to a database server. Then, a subroutine in memory is called to handle each request. The interpreter is destroyed upon restart or shutdown of the server. This *is not CGI*, your existing scripts will need some changes. Apache's i/o is not stream oriented. So, you cannot print() to STDOUT from your script, use $r->print() instead. Nor can you read() from STDIN, use $r->read() or the $r->content methods to read POST data. (A clean mechanism is in the works for redirecting your script's streams.) See the eg/ directory for and read the documentation in Apache.pm for examples. Your scripts will not run from the command line (yet). For users of CGI.pm, see the Apache::CGI module for compatibility. There are modules on the way to support the CGI::* modules as well. For comments, questions, bug-reports, announcements, etc., send mail to majordomo@listproc.itribe.net with the string "subscribe modperl" in the body. (Thanks to Mark A. Imbriaco ) KNOWN BUGS mod_perl leaks memory, this is a problem with perl itself, which is being fixed. mod_perl_fast leaks memory when the server is restarted this too is a problem with perl itself, which is being fixed. Installation needs work. TODO o Resolve multiple perl interpreter issues. o Complete Apache.xs interface o Find a way to hookup perl's STDIN and STDOUT to the client with this new i/o scheme. tie(*STDIN, Tie::ApacheHandle, $r) anyone? o Provide an optional and configurable Safe wrapper around embedded scripts (almost there) ACKNOWLEGEMENTS Many thanks to Gisle Aas for getting this started. Thanks to John Detloff for contributions to mod_perl_fast.