Apache::PerlRunFilter(3pm)

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-script
  PerlHandler Apache::PerlRunFilter Apache::SSI
  PerlSetVar Filter on
 </Files>
 # Generate some Perl code using templates, then execute it
 <Files ~ "\.tmpl$">
  SetHandler perl-script
  PerlHandler YourModule::GenCode Apache::PerlRunFilter
  PerlSetVar 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.

  1. 2.2
  2. 3.0
  3. 3.1
  4. 4.0

Author

Ken Williams <[email protected]>

From libapache-filter-perl 1.024-2 in Debian 4.0 (Etch). Parsed by carta from the page's man source.