HOME

TheInfoList



OR:

The Template Toolkit (TT) is a template engine used primarily for building web sites, but is also suitable for creating any type of
digital document An electronic document is any electronic media content (other than computer programs or system files) that is intended to be used in either an electronic form or as printed output. Originally, any computer data were considered as something intern ...
, such as a
PDF Portable Document Format (PDF), standardized as ISO 32000, is a file format developed by Adobe in 1992 to present documents, including text formatting and images, in a manner independent of application software, hardware, and operating systems. ...
or
LaTeX Latex is an emulsion (stable dispersion) of polymer microparticles in water. Latexes are found in nature, but synthetic latexes are common as well. In nature, latex is found as a milky fluid found in 10% of all flowering plants (angiosper ...
file. Template Toolkit is based on a
mini-language A domain-specific language (DSL) is a computer language specialized to a particular application domain. This is in contrast to a general-purpose language (GPL), which is broadly applicable across domains. There are a wide variety of DSLs, ranging ...
and does not allow direct Perl in its templates by default, unlike some competing products (e.g. Mason). This forces developers to separate
business logic In computer software, business logic or domain logic is the part of the program that encodes the real-world business rules that determine how data can be created, stored, and changed. It is contrasted with the remainder of the software that might ...
into Perl
libraries A library is a collection of materials, books or media that are accessible for use and not just for display purposes. A library provides physical (hard copies) or digital access (soft copies) materials, and may be a physical location or a vir ...
, leaving only
presentation logic In software development, presentation logic is concerned with how business objects are displayed to users of the software, e.g. the choice between a pop-up screen and a drop-down menu. The separation of business logic from presentation logic is an ...
in their templates. It is written in
Perl Perl is a family of two High-level programming language, high-level, General-purpose programming language, general-purpose, Interpreter (computing), interpreted, dynamic programming languages. "Perl" refers to Perl 5, but from 2000 to 2019 it ...
, with some popular accessories in C. It is released under a
free software licence A free-software license is a notice that grants the recipient of a piece of software extensive rights to modify and redistribute that software. These actions are usually prohibited by copyright law, but the rights-holder (usually the author) ...
( Perl Artistic Licence or
GPL The GNU General Public License (GNU GPL or simply GPL) is a series of widely used free software licenses that guarantee end users the four freedoms to run, study, share, and modify the software. The license was the first copyleft for general us ...
). TT is used as a templating system for various Perl application frameworks, including the Catalyst MVC Framework, CGI::Application and the Maypole framework. The Template Toolkit was written by Andy Wardley. The "prototype" for TT (the Text::MetaText Perl module) was released in 1996. The first version of TT proper was released in 1999. Version 2.00 a.k.a. TT2 was released in 2001. A revised and revamped TT3 was in development, but appears abandoned. In the meantime, TT2 is steadily improved and has been released as version 3 late 2019.


External links


Template Toolkit Web Site

Template Toolkit on the CPAN

GitHub repository



Haskell version


References

{{Perl Perl modules Free software programmed in Perl Template engines