This software allows for the implementation of Server Side Includes using the Perl programming language. This feature enables the inclusion of data and elements, such as headers and footers, from other pages resulting in faster website loading times and improved website organization.
SetHandler perl-script
PerlHandler Apache::SSI
If you want to create your own SSI extensions, subclass Apache::SSI, compile mod_perl with PERL_METHOD_HANDLERS=1, and create a module. Then, in httpd.conf, use the following template:
SetHandler perl-script
PerlHandler MySSI
Apache::SSI makes use of mod_include to handle server-parsed HTML documents and runs under Apache's mod_perl. There are two primary reasons why you might want to use this module. Firstly, you can subclass it to implement custom SSI directives. Secondly, you can parse the output of other mod_perl handlers or send SSI output through another handler using Apache::Filter.
Each SSI directive is handled by an Apache::SSI method with the prefix "ssi_". For example, < !--#printenv-- > is processed by the ssi_printenv method. Attribute/value pairs within the SSI tags are parsed and passed to the method in a hash reference.
The ssi_echo method deals with 'echo' directives by delegating lookup to methods with the prefix "echo_". For example, < !--#echo var=DOCUMENT_NAME-- > is handled by the echo_DOCUMENT_NAME method.
By inheriting from Apache::SSI and overriding 'ssi_*' and 'echo_*' methods, or writing new methods, you can customize the module's behavior to suit your requirements.
Version 2.19: N/A