View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Joachim Zobel > Cindy-Apache2-0.06 > Cindy::Apache2



Annotate this POD

View/Report Bugs
Module Version: 0.06   Source   Latest Release: Cindy-Apache2-0.09


Cindy::Apache2 - use unmodified XML or HTML documents as templates.


  RewriteEngine On
  RewriteRule ^/cindy/content/(.*)$  /cindy/$1 [NS,E=CINDY_DATA_URI:/cindy/$1]
  PerlModule Cindy::Apache2
  <Location /cindy/content>
  SetEnv CINDY_CIS_URI /cindy/tmpl/frame.cjs
  SetEnv CINDY_DOC_URI /cindy/tmpl/frame.html

  SetHandler  perl-script
  PerlHandler Cindy::Apache2


Cindy::Apache2 uses the Cindy module in an apache content handler. Cindy merges data into a document template using a content injection sheet to create its response. As you see above it is used by configuring apache. This can be done from .htaccess.

Since the handler needs 3 components for a request their names are passed as enviroment variables. These are CINDY_DOC_URI, CINDY_DATA_URI and CINDY_CIS_URI. Alternatively CINDY_DOC_FILE, CINDY_DATA_FILE, CINDY_CIS_FILE can be used. While the former ones are used as URIs (similiar to SSIs include virtual), the latter ones require a file system path. In each case an internal subrequest is made. This means that all three components can be dynamically created.

If one of the components does not return a 200 status, processing is aborted and that status is returned. The last modified headers of the components are used to either add a last modified header to the response or to respond with a 304.

If the enviroment variable CINDY_FATALS_TO_BROWSER is set error messages are forwarded to the browser.


Joachim Zobel <>


See the Cindy documentation for further explanantions on content injection sheets and on what is done with those 3 files.

See for a more elaborate example of what can be done with Cindy::Apache2.

syntax highlighting: