Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 300 lines (195 sloc) 10.087 kb
3ebfa076 »
2000-06-25 Initial revision
1
c8d76d48 »
2001-03-29 *** empty log message ***
2 Template Toolkit
e39913fd »
2000-07-10 *** empty log message ***
3
d56b9a8c »
2006-01-30 commit for 2.14a
4 Version 2.15
e39913fd »
2000-07-10 *** empty log message ***
5
d56b9a8c »
2006-01-30 commit for 2.14a
6 30 January 2006
c8d76d48 »
2001-03-29 *** empty log message ***
7
026fc4c9 »
2004-01-06 * verion 2.11
8 Copyright (C) 1996-2004 Andy Wardley. All Rights Reserved
714a8cdb »
2002-07-05 * prep for release 2.07a
9 Copyright (C) 1998-2002 Canon Research Centre Europe Ltd.
e39913fd »
2000-07-10 *** empty log message ***
10
82cbea87 »
2000-11-01 version 2.00
11 This is free software; you can redistribute it and/or
12 modify it under the same terms as Perl itself.
e39913fd »
2000-07-10 *** empty log message ***
13
02bbd79c »
2001-09-21 version 2.05b release
14
25600c7c »
2001-09-21 *** empty log message ***
15 QUICK START (see INSTALL for further details)
c8d76d48 »
2001-03-29 *** empty log message ***
16 -----------
17
9fa99ba2 »
2001-09-21 misc docs updated
18 The latest version of the Template Toolkit can be retrieved from:
19
20 http://www.cpan.org/modules/by-module/Template/
21
d56b9a8c »
2006-01-30 commit for 2.14a
22 Fetch and install AppConfig 1.56 if you don't already have it installed.
9fa99ba2 »
2001-09-21 misc docs updated
23 Available from CPAN in:
24
25 http://www.cpan.org/authors/Andy_Wardley/
26
27 To install the Template Toolkit:
28
d56b9a8c »
2006-01-30 commit for 2.14a
29 tar zxf Template-Toolkit-2.15.tar.gz
30 cd Template-Toolkit-2.15
9fa99ba2 »
2001-09-21 misc docs updated
31 perl Makefile.PL
32 make
33 make test
34 make install
35
36 The Makefile.PL will prompt for additional configuration options,
37 including the installation of optional template libraries, HTML
38 documentation and examples. You can safely answer 'n' to all of these
39 questions for a quick and basic installation.
40
72df2bfc »
2001-11-06 2.05d prep
41 If you're running ActivePerl on a Win32 platform then you can use the
42 Perl Package Manager (PPM) to install the Template Toolkit. Chris
43 Winters maintains a repository of pre-compiled PPM packages which contains
44 the Template Toolkit, AppConfig and others. For further information, see:
45
46 http://openinteract.sourceforge.net/
47
c8d76d48 »
2001-03-29 *** empty log message ***
48
25600c7c »
2001-09-21 *** empty log message ***
49 For further details on installation, see the separate INSTALL file.
c8d76d48 »
2001-03-29 *** empty log message ***
50
82cbea87 »
2000-11-01 version 2.00
51
52 DESCRIPTION
53 -----------
54
55 The Template Toolkit is a collection of modules which implement a
56 fast, flexible, powerful and extensible template processing system.
57 It was originally designed and remains primarily useful for generating
58 dynamic web content, but it can be used equally well for processing
59 any other kind of text based documents: HTML, XML, POD, PostScript,
60 LaTeX, and so on.
61
62 It can be used as a stand-alone Perl module or embedded within an
63 Apache/mod_perl server for generating highly configurable dynamic web
64 content. A number of Perl scripts are also provided which can greatly
65 simplify the process of creating and managing static web content and
66 other offline document systems.
67
68
c8d76d48 »
2001-03-29 *** empty log message ***
69 WHAT'S NEW?
70 -----------
71
d56b9a8c »
2006-01-30 commit for 2.14a
72 Version 2.15 features a number of enhancements to the XS Stash that
73 includes support for tied hashes and arrays. There are numerous other
74 bug fixes and enhancements, described in detail in the Changes file.
dfe8b145 »
2003-07-24 version 2.10
75
d56b9a8c »
2006-01-30 commit for 2.14a
76 More significant is what's not in version 2.15. The DBI plugin has
77 been moved into a separate Template-DBI distribution, the GD plugins
78 into Template-GD, the XML plugins into Template-XML, and the Latex
79 filters into Template-Latex. This has been done in an effort to make
80 the Template Toolkit core distribution smaller, cleaner and easier to
81 configure and install.
86f0e01a »
2002-07-07 * prep for 2.07b
82
d56b9a8c »
2006-01-30 commit for 2.14a
83 Version 2.14 added Unicode support to TT, a full set of command line
84 options for tpage, the 'caller' and 'callers' items to each template
85 component, some enhancements to the XML::Simple plugin, and a number
86 of minor bug fixes.
86f0e01a »
2002-07-07 * prep for 2.07b
87
d56b9a8c »
2006-01-30 commit for 2.14a
88 See the Changes file for further details of the changes in these and
89 earlier releases.
c8d76d48 »
2001-03-29 *** empty log message ***
90
91
92 GENERAL FEATURES
93 ----------------
94
95 Some of the key features of the Template Toolkit are listed below.
96 See the documentation for further detail.
97
98 * simple but powerful template language
82cbea87 »
2000-11-01 version 2.00
99
100 * promotes a clear separation between application functionality and
101 presentation elements
102
103 * variable substitution allows binding to any Perl data types
104 (scalars, hashes, lists, subs, objects)
105
106 * conditional blocks (IF/UNLESS/ELSIF/ELSE, SWITCH/CASE)
107
108 * loops and iterators (FOREACH, WHILE)
109
110 * file/template inclusion (INSERT, INCLUDE, PROCESS, WRAPPER)
111
112 * definition of local template components (BLOCK)
113
114 * post-processing filters (FILTER)
115
116 * plugin module architecture for easy extensibility (USE)
117
118 * embedded Perl can be optionally enabled (PERL/RAWPERL)
119
120 * full exception handling (TRY/THROW/CATCH/FINAL)
121
122 * user-defined macros (MACRO)
123
124 * definition of template metadata (META)
125
126 * virtual methods for complex data types (e.g. list.size, hash.keys, etc.)
127
128 * numerous configuration options
129
130 * modular OO architecture allows extensive customisation
131
132 * fast LALR(1) parser modules compiles templates according to a
133 YACC-like grammar.
134
135 * templates compiled to Perl code for efficient runtime execution
136
137 * in-memory and on-disk caching of compiled templates
138
139 * simple front end module (Template.pm) for ease of use
140
141 * numerous plugin modules: CGI, DBI, XML, URL, Date, Table, etc
142
143 * standard filters for html, case folding, regex search and replace, etc.
144
145
146 DOCUMENTATION
147 -------------
148
149 The Template Toolkit is provided with enough documentation to keep all
e3e75eed »
2001-03-30 *** empty log message ***
150 but the most voracious reader happy for quite some time.
82cbea87 »
2000-11-01 version 2.00
151
152 The 'Changes' file in the distribution directory documents all visible
153 changes between versions of the Template Toolkit. See the section
154 'VERSION COMPATABILITY' below for further details.
0cc11568 »
2000-08-10 beta3
155
82cbea87 »
2000-11-01 version 2.00
156 The 'TODO' file, also in the distribution directory, lists known bugs,
c8d76d48 »
2001-03-29 *** empty log message ***
157 planned enhancements and possible new features for future versions.
158
25600c7c »
2001-09-21 *** empty log message ***
159 The 'INSTALL' file covers the configuration and installation process.
160
c8d76d48 »
2001-03-29 *** empty log message ***
161 The rest of the documentation is distributed in Pod and HTML formats.
162 The Pod pages are installed when you 'make install' and can be viewed
163 using 'perldoc', e.g.
164
165 perldoc Template
0cc11568 »
2000-08-10 beta3
166
c8d76d48 »
2001-03-29 *** empty log message ***
167 If you're using a Unix based system then the pages should also be
168 converted to manpages suring the 'make install'. Thus, you can also:
e39913fd »
2000-07-10 *** empty log message ***
169
82cbea87 »
2000-11-01 version 2.00
170 man Template
171
c8d76d48 »
2001-03-29 *** empty log message ***
172 (the man pages shouldn't have any problems relating to older versions)
e39913fd »
2000-07-10 *** empty log message ***
173
c8d76d48 »
2001-03-29 *** empty log message ***
174 The HTML documentation and the means to rebuild it can be found in the
175 'docs' sub-directory of the installation root. If you opted to
176 have it built at installation time, then there should be an 'html'
177 directory within it containing the generated HTML built from the
178 source templates.
179
180 The documentation is now split into several sections. The 'Template'
181 page is now much shorter, containing information relating to the
182 specifics of using the Template module, and a brief summary of
183 everything else. Information relating more generally to the Template
184 Toolkit, features, syntax of the template language, plugins and so
c55609c1 »
2001-03-29 *** empty log message ***
185 forth, has been split up into a number of Template::Manual::* pages.
c8d76d48 »
2001-03-29 *** empty log message ***
186 Template::Manual provides the index for the manual.
187
188 perldoc Template::Manual
e39913fd »
2000-07-10 *** empty log message ***
189
c8d76d48 »
2001-03-29 *** empty log message ***
190 Individual sections can be viewed as, for example,
191
192 perldoc Template::Manual::Syntax
193 perldoc Template::Manual::Directives
194 perldoc Template::Manual::Plugins
195
31cb4818 »
2001-06-15 2.03
196 The Template::Tutorial provides an index to the tutorial documents.
197 There are currently 2 tutorials, on generating web content, and on
198 creating and using data files.
82cbea87 »
2000-11-01 version 2.00
199
200 perldoc Template::Tutorial
31cb4818 »
2001-06-15 2.03
201 perldoc Template::Tutorial::Web
202 perldoc Template::Tutorial::Datafile
82cbea87 »
2000-11-01 version 2.00
203
c8d76d48 »
2001-03-29 *** empty log message ***
204 The new template libraries distributed with the Template Toolkit have
205 some documentation, but be warned that it is rather spartan at
206 present. If you're interested in using these libraries then the
207 examples (in the 'examples' sub-directory) are likely to be much more
208 useful until the documentation catches up.
209
210 perldoc Template::Library::HTML
211 perldoc Template::Library::Splash
212
82cbea87 »
2000-11-01 version 2.00
213 Each of the various modules that comprise the Template Toolkit has its
c8d76d48 »
2001-03-29 *** empty log message ***
214 own associated documention. The 'Template::Modules' manpage lists
215 these modules along with a brief description of their functions.
216
217 perldoc Template::Modules
218
219 See the individual pages for further detail:
82cbea87 »
2000-11-01 version 2.00
220
221 perldoc Template::Context
222 perldoc Template::Parser
223 perldoc Template::Provider
224
c8d76d48 »
2001-03-29 *** empty log message ***
225 If you're interested in the internals of the Template Toolkit and want
226 to know more about how it all works, then you might like to have a look
227 at the following:
228
229 perldoc Template::Manual::Internals
230
25600c7c »
2001-09-21 *** empty log message ***
231 This document also contains important information for people wishing
232 to hack on the Template Toolkit.
233
c8d76d48 »
2001-03-29 *** empty log message ***
234 The final bit of good news is that there is now a FAQ for the Template
235 Toolkit.
236
237 perldoc Template::FAQ
238
31cb4818 »
2001-06-15 2.03
239 It's now got a few question in it, and better still, some answers!
240 Further contributions welcome.
82cbea87 »
2000-11-01 version 2.00
241
e3e75eed »
2001-03-30 *** empty log message ***
242 Most of the documentation is stable and reliable. Where it's not then
243 it's usually marked as such. In particular, the documentation for the
244 template libraries (Template::Library::*), the FAQ (Template::FAQ) and
245 internals (Template::Internals) are all under construction.
246
82cbea87 »
2000-11-01 version 2.00
247
248 SUPPORT
249 -------
250
251 The Template Toolkit mailing list provides a forum for discussing
252 issues relating to the use and abuse of the Template Toolkit. There
253 are a number of knowledgeable and helpful individuals who frequent the
254 list (including the author) who can often offer help or suggestions.
255 Please respect their time and patience by checking the documentation
256 and/or mailing list archives before asking questions that may already
257 have been answered.
258
259 To subscribe to the mailing list, send an email to:
260
261 templates-request@template-toolkit.org
262
263 with the message 'subscribe' in the body. You can also use the web
264 interface to subscribe or browse the archives:
265
266 http://www.template-toolkit.org/mailman/listinfo/templates
267
268 A low-volume, moderated mailing list exists for announcements about new
269 releases of the Template Toolkit and related products. To subscribe, send
270 an email to:
271
272 templates-announce-request@template-toolkit.org
273
274 with the message 'subscribe' in the body. A web interface also exists
275 for subscription and browsing the archives:
276
277 http://www.template-toolkit.org/mailman/listinfo/templates-announce
278
279 For information about commercial support and consultancy for the Template
280 Toolkit, please contact the author.
281
282
283 AUTHOR
284 ------
285
d9145459 »
2003-04-23 version 2.09
286 The Template Toolkit was written by Andy Wardley <abw@wardley.org> with
82cbea87 »
2000-11-01 version 2.00
287 the invaluable assistance and contributions from many other people.
c8d76d48 »
2001-03-29 *** empty log message ***
288 See Template::Manual::Credits for details.
82cbea87 »
2000-11-01 version 2.00
289
290
291 COPYRIGHT
292 ---------
293
026fc4c9 »
2004-01-06 * verion 2.11
294 Copyright (C) 1996-2004 Andy Wardley. All Rights Reserved.
714a8cdb »
2002-07-05 * prep for release 2.07a
295 Copyright (C) 1998-2002 Canon Research Centre Europe Ltd.
0cc11568 »
2000-08-10 beta3
296
82cbea87 »
2000-11-01 version 2.00
297 This is free software; you can redistribute it and/or modify it under
298 the same terms as Perl itself.
1aa12d4e »
2000-09-14 *** empty log message ***
299
Something went wrong with that request. Please try again.