.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "HTML::Template::Pro 3pm" .TH HTML::Template::Pro 3pm 2024-03-07 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME HTML::Template::Pro \- Perl/XS module to use HTML Templates from CGI scripts .SH SYNOPSIS .IX Header "SYNOPSIS" It is moved out and split. .PP See "SYNOPSIS" in HTML::Template::SYNTAX for introduction to HTML::Template and syntax of template files. .PP See "SYNOPSIS" in HTML::Template::PerlInterface for perl interface of HTML::Template, HTML::Template::Expr and HTML::Template::Pro. .SH DESCRIPTION .IX Header "DESCRIPTION" Original HTML::Template is written by Sam Tregar, sam@tregar.com 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. .PP 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. .PP HTML::Template::Pro has complete support of filters and HTML::Template::Expr's tag EXPR="", including user-defined functions and construction . .PP HTML::Template work cycle uses 2 steps. First, it loads and parse template. Then it accepts \fBparam()\fR calls until you call \fBoutput()\fR. \&\fBoutput()\fR is its second phase where it produces a page from the parsed tree of template, obtained in the 1st step. .PP HTML::Template::Pro loads, parse and outputs template on fly, when you call \f(CW$tmpl\fR\->\fBoutput()\fR, 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 \fBmmap()\fR for reading templates on disk. .PP 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. .SH "SEE ALSO" .IX Header "SEE ALSO" HTML::Template::SYNTAX, HTML::Template::PerlInterface. .PP Progect page is http://html\-tmpl\-pro.sourceforge.net (and http://sourceforge.net/projects/html\-tmpl\-pro) .PP Original modules are HTML::Template, HTML::Template::Expr. Their progect page is http://html\-template.sourceforge.net .SH BUGS .IX Header "BUGS" See "BUGS" in HTML::Template::PerlInterface .SH AUTHOR .IX Header "AUTHOR" I. Vlasenko, .PP with contributions of Bruni Emiliano, Stanislav Yadykin, Viacheslav Sheveliov Shigeki Morimoto Kirill Rebenok .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" Copyright (C) 2005\-2021 by I. Yu. Vlasenko. Pieces of code in Pro.pm and documentation of HTML::Template are copyright (C) 2000\-2002 Sam Tregar (sam@tregar.com) .PP The template syntax, interface conventions and a large piece of documentation of HTML::Template::Pro are based on CPAN module HTML::Template by Sam Tregar, sam@tregar.com. .PP This library is free software; you can redistribute it and/or modify it under either the LGPL2+ or under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available.