@node Apache/SSI, Apache/TieHandle, Apache/Registry, Module List
@unnumbered Implement Server Side Includes in Perl


@unnumberedsec NAME

Apache::SSI - Implement Server Side Includes in Perl

@unnumberedsec SYNOPSIS

wherever you choose:
AddType text/x-perl-server-parsed-html .phtml

add this to srm.conf:
PerlScript Apache::SSI

in access.conf or .htaccess say:
PerlResponse Apache::SSI::handler

You may wish to subclass Apache::SSI for your own extentions

@example
package MySSI;
require Apache::SSI;
@@ISA = qw(Apache::SSI);
@end example

@example
#embedded syntax:
#<!--#something cmd=doit -->
sub something @{
   my($self, $attr) = @@_;
   my $cmd = $attr->@{cmd@};
   ...
   return $a_string;	   
@} 
@end example

@unnumberedsec DESCRIPTION

Apache::SSI implements the functionality of mod_include for handling
server-parsed html documents.
Each "command" or element is handled by an Apache::SSI method of the
same name.  attribute=value pairs are parsed and passed to the method
in an anonymous hash.

This module supports the same directives as mod_include, see it@'s 
documentation for commands and syntax.

In addition, Apache::SSI supports the following directives:

@table @asis
@item perlsub
This directive calls a perl subroutine:

@example
Hello user from <!--#perlsub sub=remote_host -->
@end example

@end table
@unnumberedsec CAVEATS

This module is not complete, it does not provide the full functionality 
of mod_include.

There is no support for xssi directives.

@unnumberedsec SEE ALSO

mod_include, mod_perl_fast, HTML::TreeBuilder(3), perl(1), Apache(3)

@unnumberedsec AUTHOR

Doug MacEachern <dougm@@osf.org>
