Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Templates consist of a combination of fixed text and template directives. The template directives are recognized by the Template Toolkit and are expanded in a processor's output. In this chapter, we will take a close look at all of the directives that the Template Toolkit provides. We've already seen examples of many of them in previous chapters, but now we'll go back and fill in all of the details.
The Template Toolkit has directives for common presentation tasks. There are directives for accessing and setting variables, loading and using both external and local templates, repetition, conditional processing, flow control, and exception handling. Directives are also provided to define macros and access template metadata. If that's not enough for you, you can extend the functionality of the Template Toolkit using filters, plugins, or even inline Perl code.