---
name: "CGI::SSI_Parser"
section: "3pm"
platform: "linux"
package: "libcgi-ssi-parser-perl"
version: "0.01-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/CGI::SSI_Parser"
---

# CGI::SSI\_Parser(3pm)

Implement SSI for Perl CGI

## NAME

CGI::SSI\_Parser - Implement SSI for Perl CGI

## SYNOPSIS

```
  use CGI::SSI_Parser;
  $CGI::SSI_Parser::recursive = 1;
  fssi($filename);
  sssi($string);
```

## DESCRIPTION

CGI::SSI\_Parser is used in CGI scripts for parsing SSI directives in files or string variables, and fully implements the functionality of apache's mod\_include module.

It is an alternative to famous Apache::SSI modules, but it doesn't require mod\_perl. This is an advantage to those who are using public hosting services. There is a disadvantage, however - the module consumes much memory, and I don't recommend using it on heavy-loaded sites (currently it's being used on a site with 10000 hits, and I consider this as a limit). I hope to get rid of this disadvantage by the time the release comes out (currently it's beta).

### SSI Directives

This module supports the same directives as mod\_include. For methods listed below but not documented, please see mod\_include's online documentation at http://httpd.apache.org/docs/mod/mod\_include.html .

- •

  config

- •

  echo

  This directive is not fully supported in current version.

- •

  exec

- •

  fsize

- •

  flastmod

- •

  include

- •

  printenv

- •

  set

  This directive is not supported in current version.

- •

  perl

  This directive is not supported in current version.

- •

  if

- •

  elif

- •

  else

- •

  endif

  These four directives are not supported in current version.

### Outline Usage

First you need to load the CGI::SSI\_Parser module:

```
  use CGI::SSI_Parser;
```

You need to specify the following when processing of all nested directives is needed (default value - 0):

```
 $CGI::SSI_Parser::recursive = 1;
```

To parse file or string you need to use:

```
  fssi($filename);
  sssi($string);
```

The result is printed to STDOUT.

## TO DO

Full implementation of all SSI directives.

Optimize memory consumption.

## AUTHOR

Vadim Y. Ponomarenko, vp@istc.kiev.ua

## SEE ALSO

mod\_include, [**perl**(1)](/perl/1.md).
