NAME Apache::EmbperlChain - process embedded perl in HTML in the OutputChain SYNOPSIS In the configuration of your apache add something like PerlModule Apache::EmbperlChain SetHandler perl-script PerlHandler Apache::OutputChain Apache::EmbperlChain Apache::PassFile This will cause all html files to be processed by Embperl. Now this: SetHandler perl-script PerlHandler Apache::OutputChain Apache::GzipChain Apache::EmbperlChain My::OwnHandler Any request in the /foo subtree will be processed by My::OwnHandler. The output of that will then be filtered by EmbperlChain, which will process any embedded Perl commands. That output will then be compressed by GzipChain, which will deliver compressed content to the client. STATUS This is beta software, and the output chain mechanism itself is also beta. You currently cannot mix perl's own `print' statements that print to STDOUT and the `print' or `write_client' methods in Apache.pm. If you do that, you will very likely encounter empty documents and probably core dumps too. Since Apache::OutputChain uses perl's `print' statement, you'll want to stick to that too. DESCRIPTION This module calls HTML::Embperl to process any output from another perl handler. When it is the last module in the chain, EmbperlChain will buffer its input and feed it to Embperl when all content has been printed by the producer. When not the last module in the chain, EmbperlChain processes every single buffer content it receives via the output chain separately. Therefore care must be taken to print valid embedded perl chunks in the content handler. It is recommended that you use as few print statements as possible in conjunction with EmbperlChain. The Apache::PassFile module is an example of an efficient file reader for this purpose. PREREQUISITES Apache, mod_perl, HTML::Embperl, Apache::OutputChain AUTHOR Eric Cholet, cholet@logilune.com Parts of this document shamelessly copied from Apache::GzipChain by Andreas Koenig. SEE ALSO Apache::GzipChain, Apache::SSIChain