Apache::PerlRunFilter3pm
Run perl scripts in an apache::filter chain
Usage
#in httpd.conf
PerlModule Apache::PerlRunFilter
# Run the output of scripts through Apache::SSI<Files ~ "\.pl$">SetHandler perl-scriptPerlHandler Apache::PerlRunFilter Apache::SSIPerlSetVar Filter on</Files>
# Generate some Perl code using templates, then execute it<Files ~ "\.tmpl$">SetHandler perl-scriptPerlHandler YourModule::GenCode Apache::PerlRunFilterPerlSetVar Filter on</Files>
Overview
This module is a subclass of Apache::PerlRun, and contains all of its functionality. The only difference between the two is that this module can be used in conjunction with the Apache::Filter module, whereas Apache::PerlRun cannot.
It only takes a tiny little bit of code to make the filtering stuff work, so perhaps it would be more appropriate for the code to be integrated right into Apache::PerlRun. As it stands, I've had to duplicate a bunch of PerlRun's code here (in the handler routine), so bug fixes & feature changes must be made both places.
Caveats
Note that this is not an exact replacement for Apache::Registry - it doesn't do any of the code-caching stuff that Registry does. It shouldn't be too hard a task, but for now Registry is still based on old code, and Doug's plan is to make future versions of Registry by subclassing PerlRun (see Apache::RegistryNG). Since this is the case, I figured I'd hold off on doing any Registry work until things have moved forward a bit.
Releases
4 releases since Debian 2.2 (Potato); the text changed 3 times.