/home/cpanrun/depot/main/contrib-patched/perl/CPAN/src/HTML-Tmojo/blib/lib/HTML/Tmojo/SimpleHandler.pm


NAME

HTML::Tmojo::SimpleHandler


SYNOPSIS

  # IN YOUR APACHE CONFIG
  DirectoryIndex index.tmojo index.html
  <LocationMatch "\.tmojo$">
    SetHandler perl-script
    PerlHandler HTML::Tmojo::SimpleHandler
    PerlSetEnv TMOJO_CACHE_DIR /tmp/mojo
  </LocationMatch>


ABSTRACT

The SimpleHandler can be used to quickly deploy Tmojo to your apache/mod_perl environment. Simply adding the above code to your httpd.conf will allow Apache to serve any .tmojo documents in your htdocs as Tmojo templates.


=head1 OPTIONS

The SimpleHandler obeys the following environment variables:

TMOJO_TEMPLATE_DIR
SimpleHandler will look for its templates in this directory. If not specified, SimpleHandler will look for its templates in the apache document root.

TMOJO_CACHE_DIR
This required setting tells SimpleHandler where to store compiled Tmojo templates. The directory must be writable by apache.

TMOJO_DEFAULT_CONTAINER
If specified, SimpleHandler will use this path to determine the container template on each requested template. This option will override any $TMOJO_CONTAINER specified within templates.

Normally, you would use this option to create a directory level containment mechanism. For instance, by setting TMOJO_DEFAULT_CONTAINER to container.tmojo^, you can make the SimpleHandler use the deepest template named container.tmojo as the container for the requested template.


AUTHOR

Will Conant <will@willconant.com>

 /home/cpanrun/depot/main/contrib-patched/perl/CPAN/src/HTML-Tmojo/blib/lib/HTML/Tmojo/SimpleHandler.pm