The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

FEATURES

-

Fast, flexible, generic and open template processing system.

-

Simple template "mini-language" provides functionality to manipulate variables (GET/SET/DEFAULT), process other template component files (INCLUDE/PROCESS), iterate through various values (FOREACH), conditional branching (IF/UNLESS/ELSIF/ELSE), error handling (CATCH, THROW), flow control (BREAK, RETURN, STOP), loading "plugin" code (USE) and post-processing (FILTER). Optional PERL sections (disabled by default - see EVAL_PERL option) allow Perl code to be directly embedded with full interface to the Template Toolkit interface and variables.

-

More complex application code can be developed in Perl (or C, C++, etc) and maintained separately as "plugin" code. Template processor binds user code to variables to provide access to application functionality from templates.

-

This natural extensibility promotes the separation of the application (implementation) from the interface (presentation). Template documents remain simple and focussed on rendering the interface. Application code can be made more generic by concentrating on what the application does, not what it looks like. If and when you really need to embed Perl code, you can.

-

Ideally suited, but not limited to, web content generation. The 'tpage' and 'ttree' scripts help manage and build entire directory trees from source templates, library files and plugin components. The Template module can be used directly from CGI scripts, Apache/mod_perl handlers, or any other Perl code as a simple front-end to the Toolkit. Plugin modules are available for interfacing to CGI, DBI, XML, DOM, etc.

-

Template documents parsed by a fast LALR(1) parser which is generated from a YACC-like grammar. Parse::Yapp is used to compile the grammar. Parser grammar can be modified and re-compiled to create custom template languages.

-

Parsed template documents are compiled to an intermediate form and cache. They can subsequently be rendered repeatedly in minimal time.

-

Stash object manages references to complex external code and data and provides a simple template interface via bound variables.

-

Variables may be partitioned into nested namespaces.

-

Custom error handling and recovery mechanisms implemented as basic exception handling. Users can define template blocks to be processed automatically when errors occur and define the subsequent course of action.

-

Iterator objects can be created to handle complex set iteration. This is handled transparently by the FOREACH directive.

-

Provides an extensible framework for other template languages, processors and applications, servers, etc.

-

Template language is largely independent (theoretically at least) of the implementation language, platform, operating system, etc.

-

Extensive documentation, test suite, examples, etc.

-

use strict and -w safe. Y2K compliant (no dates used or stored).

-

Ongoing development and maintenance is part of a general research program into web-relevant software tools and techniques at Canon Research Centre Europe Ltd.

-

Fully open source code. Contributions, collaborations, suggestions and other feedback welcome.

-

Mailing list: send email to majordomo@cre.canon.co.uk containing the text "subscribe templates".