Practical mod_perl / HTML Book /



previous page: B.15.2. Apache::Clean—mod_perl Interface Into HTML::Clean
  
page up: HTML Version of the book
  
next page: B.15.4. Apache::GzipChain—Compress HTML (or Anything) in the OutputChain

B.15.3. Apache::Filter—Alter the Output of Previous Handlers


In the following configuration:

<Files ~ "*\.fltr">
    SetHandler perl-script
    PerlSetVar Filter On
    PerlHandler Filter1 Filter2 Filter3
</Files>

each of the handlers Filter1, Filter2, and Filter3 will make a call to $r->filter_input( ), which will return a file handle. For Filter1, the file handle points to the requested file. For Filter2, the file handle contains whatever Filter1 wrote to STDOUT. For Filter3, it contains whatever Filter2 wrote to STDOUT. The output of Filter3 goes directly to the browser.

Available from CPAN. See the module manpage for more information.

 

Continue to:

  • prev: B.15.2. Apache::Clean—mod_perl Interface Into HTML::Clean
  • Table of Contents
  • next: B.15.4. Apache::GzipChain—Compress HTML (or Anything) in the OutputChain







TOP
previous page: B.15.2. Apache::Clean&#8212;mod_perl Interface Into HTML::Clean
  
page up: HTML Version of the book
  
next page: B.15.4. Apache::GzipChain&#8212;Compress HTML (or Anything) in the OutputChain


Menu

  • HTML Book
  • PDF Book
  • Download Code
  • Table of Contents
  • Errata
  • mod_perl2 User's Guide
  • Sitemap

Search


Add to Google




Creative Commons License


Written by
Eric Cholet (Logilune) and
Stas Bekman (StasoSphere & Free Books).


[ Privacy Policy | Terms of Use | About Us | Search ]

© 2007 StasoSphere.com