Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Now that we've spent a great deal of time looking at what you can do with the Template Toolkit, let's take a look inside and get a feel for how it actually works. We'll follow the flow of processing a template from the frontend (such as Template or ttree), to getting the file from disk (Template::Provider), to compiling it (Template::Parser, Template::Grammar, and Template::Directive), and to executing it (Template::Context and Template::Document).
We'll be using pseudocode versions of the methods to illustrate the major thrust of each component, mainly to gloss over tedious details of error checking, parameter handling, file opening and closing, and syntax. Feel free to get a copy of each .pm file and follow along with the real code; however, the best way to understand any complex system is to look at the innards, and the Template Toolkit is no exception.