1Template::Toolkit(3)  User Contributed Perl Documentation Template::Toolkit(3)
2
3
4

NAME

6       Template::Toolkit - Template Processing System
7

Introduction

9       The Template Toolkit is a collection of Perl modules which implement a
10       fast, flexible, powerful and extensible template processing system.
11
12       It is "input-agnostic" and can be used equally well for processing any
13       kind of text documents: HTML, XML, CSS, Javascript, Perl code, plain
14       text, and so on.  However, it is most often used for generating static
15       and dynamic web content, so that's what we'll focus on here.
16
17       Although the Template Toolkit is written in Perl, you don't need to be
18       a Perl programmer to use it. It was designed to allow non-programmers
19       to easily create and maintain template-based web sites without having
20       to mess around writing Perl code or going crazy with cut-n-paste.
21
22       However, the Template Toolkit is also designed to be extremely flexible
23       and extensible. If you are a Perl programmer, or know someone who is,
24       then you can easily hook the Template Toolkit into your existing code,
25       data, databases and web applications. Furthermore, you can easily
26       extend the Template Toolkit through the use of its plugin mechanism and
27       other developer APIs.
28
29       Whatever context you use it in, the primary purpose of the Template
30       Toolkit is to allow you to create a clear separation between the
31       presentation elements of your web site and everything else.
32
33       If you're generating static web pages, then you can use it to separate
34       the commonly repeated user interface elements on each page (headers,
35       menus, footers, etc.) from the core content. If you're generating
36       dynamic web pages for the front end of a web application, then you'll
37       also be using it to keep the back-end Perl code entirely separate from
38       the front-end HTML templates.  Either way, a clear separation of
39       concerns is what allow you to concentrate on one thing at a time
40       without the other things getting in your way.  And that's what the
41       Template Toolkit is all about.
42

Documentation

44       The documentation for the Template Toolkit is organised into five
45       sections.
46
47       The Template::Manual contains detailed information about using the
48       Template Toolkit. It gives examples of its use and includes a full
49       reference of the template language, configuration options, filters,
50       plugins and other component parts.
51
52       The Template::Modules page lists the Perl modules that comprise the
53       Template Toolkit. It gives a brief explanation of what each of them
54       does, and provides a link to the complete documentation for each module
55       for further information. If you're a Perl programmer looking to use the
56       Template Toolkit from your Perl programs then this section is likely to
57       be of interest.
58
59       Most, if not all of the information you need to call the Template
60       Toolkit from Perl is in the documentation for the Template module. You
61       only really need to start thinking about the other modules if you want
62       to extend or modify the Template Toolkit in some way, or if you're
63       interested in looking under the hood to see how it all works.
64
65       The documentation for each module is embedded as POD in each module, so
66       you can always use "perldoc" from the command line to read a module's
67       documentation.  e.g.
68
69           $ perldoc Template
70           $ perldoc Template::Context
71             ...etc...
72
73       It's worth noting that all the other documentation, including the user
74       manual is available as POD.  e.g.
75
76           $ perldoc Template::Manual
77           $ perldoc Template::Manual::Config
78             ...etc...
79
80       The Template::Tools section contains the documentation for
81       Template::Tools::tpage and Template::Tools::ttree.  These are two
82       command line programs that are distributed with the Template Toolkit.
83       tpage is used to process a single template file, ttree for processing
84       entire directories of template files.
85
86       The Template::Tutorial section contains two introductory tutorials on
87       using the Template Toolkit. The first is Template::Tutorial::Web on
88       generating web content. The second is Template::Tutorial::Datafile on
89       using the Template Toolkit to generate other data formats including
90       XML.
91
92       The final section of the manual is Template::FAQ which contains answers
93       to some of the Frequently Asked Questions about the Template Toolkit.
94
95       You can read the documentation in HTML format either online at the
96       Template Toolkit web site, <http://template-toolkit.org/>, or by
97       downloading the HTML version of the documentation from
98       <http://template-toolkit.org/download/index.html#html_docs> and
99       unpacking it on your local machine.
100

Author

102       The Template Toolkit was written by Andy Wardley (<http://wardley.org/>
103       <mailto:abw@wardley.org>) with assistance and contributions from a
104       great number of people.  Please see Template::Manual::Credits for a
105       full list.
106
108       Copyright (C) 1996-2013 Andy Wardley.  All Rights Reserved.
109
110       This module is free software; you can redistribute it and/or modify it
111       under the same terms as Perl itself.
112

See Also

114       Template, Template::Manual, Template::Modules, Template::Tools,
115       Template::Tutorial
116
117
118
119perl v5.30.1                      2020-01-30              Template::Toolkit(3)
Impressum