HTML::Template::Pro(3pm)

HTML::Template::Pro3pm

Perl/xs module to use html templates from cgi scripts

Usage

It is moved out and split.

See "SYNOPSIS" in HTML::Template::SYNTAX for introduction to HTML::Template and syntax of template files.

See "SYNOPSIS" in HTML::Template::PerlInterface for perl interface of HTML::Template, HTML::Template::Expr and HTML::Template::Pro.

Overview

Original HTML::Template is written by Sam Tregar, [email protected] with contributions of many people mentioned there. Their efforts caused HTML::Template to be mature html tempate engine which separate perl code and html design. Yet powerful, HTML::Template is slow, especially if mod_perl isn't available or in case of disk usage and memory limitations.

HTML::Template::Pro is a fast lightweight C/Perl+XS reimplementation of HTML::Template (as of 2.9) and HTML::Template::Expr (as of 0.0.7). It is not intended to be a complete replacement, but to be a fast implementation of HTML::Template if you don't need querying, the extended facility of HTML::Template. Designed for heavy upload, resource limitations, abcence of mod_perl.

HTML::Template::Pro has complete support of filters and HTML::Template::Expr's tag EXPR="<expression>", including user-defined functions and construction <TMPL_INCLUDE EXPR="...">.

HTML::Template work cycle uses 2 steps. First, it loads and parse template. Then it accepts param() calls until you call output(). output() is its second phase where it produces a page from the parsed tree of template, obtained in the 1st step.

HTML::Template::Pro loads, parse and outputs template on fly, when you call $tmpl->output(), in one pass. The corresponding code is written in C and glued to Perl using Perl+XS. As a result, comparing to HTML::Template in ordinary calls, it runs 10-25 times faster. Comparing to HTML::Template with all caching enabled under mod_perl, it still 1-3 times faster. At that HTML::Template caching requires considerable amount of memory (per process, shareable, or on disk) to be permanently filled with parsed trees, whereas HTML::Template::Pro don't consumes memory for caches and use mmap() for reading templates on disk.

Introduction to HTML::Template and syntax of template files is described in HTML::Template::SYNTAX. Perl interface of HTML::Template and HTML::Template::Pro is described in HTML::Template::PerlInterface.

Releases

9 releases since Debian 5.0 (Lenny); the text changed 8 times.

  1. 5.0
  2. 6.0
  3. 7
  4. 8
  5. 9
  6. 10
  7. 11
  8. 12
  9. 13

Bugs

See "BUGS" in HTML::Template::PerlInterface

Author

I. Vlasenko, <[email protected]>

with contributions of Bruni Emiliano, <info at ebruni.it> Stanislav Yadykin, <tosick at altlinux.ru> Viacheslav Sheveliov <slavash at aha.ru> Shigeki Morimoto <shigeki.morimoto at mixi.co.jp> Kirill Rebenok <kirill at rebenok.pl>

From libhtml-template-pro-perl 0.9524-1+b5 in Debian 13 (Trixie). Parsed by carta from the page's man source.