Apache-Template

 view release on metacpan or  search on metacpan

lib/Apache/Template.pm  view on Meta::CPAN


    TT2LoadPerl     On

=item TT2Recursion

This is equivalent to the RECURSION option which allows templates to
recurse into themselves either directly or indirectly.  It is set
'Off' by default.

    TT2Recursion    On

=item TT2PluginBase

This is equivalent to the PLUGIN_BASE option.  It allows multiple 
Perl packages to be specified which effectively form a search path
for loading Template Toolkit plugins.  The default value is 
'Template::Plugin'.

    TT2PluginBase   My::Plugins  Your::Plugins

=item TT2AutoReset

This is equivalent to the AUTO_RESET option and is enabled by default.
It causes any template BLOCK definitions to be cleared before each
main template is processed.

    TT2AutoReset    Off

=item TT2CacheSize

This is equivalent to the CACHE_SIZE option.  It can be used to limit 
the number of compiled templates that are cached in memory.  The default
value is undefined and all compiled templates will be cached in memory.
It can be set to a specified numerical value to define the maximum
number of templates, or to 0 to disable caching altogether.

    TT2CacheSize    64

=item TT2CompileExt

This is equivalent to the COMPILE_EXT option.  It can be used to
specify a filename extension which the Template Toolkit will use for
writing compiled templates back to disk, thus providing cache
persistance.

    TT2CompileExt   .ttc

=item TT2CompileDir

This is equivalent to the COMPILE_DIR option.  It can be used to
specify a root directory under which compiled templates should be 
written back to disk for cache persistance.  Any TT2IncludePath 
directories will be replicated in full under this root directory.

    TT2CompileDir   /var/tt2/cache

=item TT2Debug

This is equivalent to the DEBUG option which enables Template Toolkit
debugging.  The main effect is to raise additional warnings when
undefined variables are used but is likely to be expanded in a future
release to provide more extensive debugging capabilities.

    TT2Debug        On

=item TT2Tolerant

This is equivalent to the TOLERANT option which makes the Template
Toolkit providers tolerant to errors.

    TT2Tolerant     On

=item TT2Headers

Allows you to specify which HTTP headers you want added to the
response.  Current permitted values are: 'type' (Content-Type),
'length' (Content-Length), 'modified' (Last-Modified) and 'etag'
(E-Tag).

    TT2Headers      type length

It can also be set to 'all' to enable all headers.

    TT2Headers      all

If the TT2Headers option is not specified, then it default to 'type',
sending the Content-Type header set to the value of TT2ContentType
or 'text/html' if undefined. 

    TT2Headers      type    # default - same as no TT2Headers option

The option can be set to 'none' to disable all headers, including the
Content-Type.

    TT2Headers      none

=item TT2ContentType

This option can be used to set a Content-Type other than the default
value of 'text/html'.

    TT2ContentType   text/xml

=item TT2Params

Allows you to specify which parameters you want defined as template
variables.  Current permitted values are 'uri', 'env' (hash of
environment variables), 'params' (hash of CGI parameters), 'pnotes'
(the request pnotes hash), 'cookies' (hash of cookies), 'uploads' (a
list of Apache::Upload instances), 'request' (the Apache::Request
object) or 'all' (all of the above).

    TT2Params       uri env params uploads request

When set, these values can then be accessed from within any 
template processed:

    The URI is [% uri %]

    Server name is [% env.SERVER_NAME %]



( run in 1.396 second using v1.01-cache-2.11-cpan-97f6503c9c8 )