Appendix A. Appendix: Configuration Options
The Template Toolkit is extremely configurable, and mastery of the many options takes time and practice, and requires that you read a lot of documentation. This appendix will help with the third requirement, as it contains a complete list of the Template Toolkit configuration options.
Template Toolkit Configuration Options
The options listed here can be used from a Perl program as part of
the configuration hash that is passed to the Template->new( )
method. In many cases, an
equivalent option is available for ttree users. In
those cases, the ttree version is mentioned in the
description. Finally, each option identifies the Template Toolkit module
that is the primary consumer of that option.
ABSOLUTE
The ABSOLUTE flag is used to indicate whether templates specified with absolute filenames (e.g., /foo/bar) should be processed. It is disabled by default, and any attempt to load a template by such a name will cause a file exception to be raised.
my $tt = Template->new({ ABSOLUTE => 1, }); # this is why it's disabled by default [% INSERT /etc/passwd %]
On Win32 systems, the regular expression for matching absolute pathnames is tweaked slightly to also detect filenames that start with a drive letter and colon, such as:
C:/Foo/Bar
The ttree equivalent of this option is
--absolute
.
ABSOLUTE is used by Template::Provider
.
ANYCASE
By default, directive keywords should be expressed in uppercase. The ANYCASE option can be set to allow directive keywords to be ...
Get Perl Template Toolkit now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.