Apache::SSIChain - do SSI on other modules' output


Apache-OutputChain documentation Contained in the Apache-OutputChain distribution.

Index


Code Index:

NAME

Top

Apache::SSIChain - do SSI on other modules' output

SYNOPSIS

Top

In the conf/access.conf file of your Apache installation add lines like

	<Files *.html>
	SetHandler perl-script
	PerlHandler Apache::OutputChain Apache::SSIChain Apache::PassHtml
	</Files>

DESCRIPTION

Top

This module uses Apache::SSI and Apache::OutputChain modules to create a filtering module that takes output from other modules (Apache::PassHtml, Apache::PassExec), parses SSI tags and sends the result to Apache, or maybe to other module (Apache::GzipChain by Andreas Koenig):

	<Files *.html>
	SetHandler perl-script
	PerlHandler Apache::OutputChain Apache::GzipChain Apache::SSIChain Apache::PassHtml
	</Files>

Or you can do SSI on CGI's:

	<Files *.cgi>
	PerlSendHeader On
	SetHandler perl-script
	PerlHandler Apache::OutputChain Apache::SSIChain Apache::PassExec
	Options ExecCGI
	</Files>

or even on modules processed by Apache::Registry:

	<Files *.pl>
	PerlSendHeader On
	SetHandler perl-script
	PerlHandler Apache::OutputChain Apache::SSIChain Apache::Registry
	Options ExecCGI
	</Files>

VERSION

Top

0.07

AUTHOR

Top

(c) 1998--1999 Jan Pazdziora, adelton@fi.muni.cz, http://www.fi.muni.cz/~adelton/ at Faculty of Informatics, Masaryk University, Brno, Czech Republic

SEE ALSO

Top

Apache::SSI(3); Apache::GzipChain(3); mod_perl(1); www.apache.org, www.perl.com.


Apache-OutputChain documentation Contained in the Apache-OutputChain distribution.
package Apache::SSIChain;
use Apache::SSI;
use Apache::OutputChain;

use vars qw( $VERSION @ISA );
$VERSION = 0.07;
@ISA = qw( Apache::OutputChain );

my $html_parser;
sub handler
	{
	my $r = shift;
	$html_parser = new Apache::SSI('', $r);
	Apache::OutputChain::handler($r, __PACKAGE__);
	}
sub PRINT {
	my $self = shift;
	$html_parser->text(join '', @_);
	$self->Apache::OutputChain::PRINT($html_parser->get_output());
	}

1;