In addition to the ttree script
mentioned earlier,
tpage is distributed with the Template Toolkit
for no-frills simple template processing.
You might use it like this:
panic% tpage myfile.tt2 > myfile.html
or:
panic% tpage src/myfile.html > dest/myfile.html
It is extremely useful as a command-line tool to process a template
without having to write any Perl code. However, for most uses, be it
an offline script, CGI application, or mod_perl handler,
you'll want to hook the Template
module into your Perl code.
To see how we would go about this, let us first take one of our
earlier examples and save it in a file called
example.html (see Example D-1).