Skip to Content
Perl Template Toolkit
book

Perl Template Toolkit

by Darren Chamberlain, Andy Wardley, David Cross
December 2003
Intermediate to advanced
590 pages
14h 14m
English
O'Reilly Media, Inc.
Content preview from Perl Template Toolkit

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning Perl

Beginning Perl

Curtis Ovid Poe
Perl by Example

Perl by Example

Ellie Quigley
Perl Hacks

Perl Hacks

Chromatic, Damian Conway, Curtis Ovid Poe, Curtis (Ovid) Poe
Learning Perl 6

Learning Perl 6

brian d foy

Publisher Resources

ISBN: 0596004761Supplemental ContentErrata Page