HTML::Libtemplate documentation

HTML::Libtemplate is a Perl extension wrapper to the powerful libtemplate template engine written in C. Therefore it has generally the same interface as libtemplate itself, just the names are a little bit different and it's real OO.

API documentation

Class Methods

$tpl = new HTML::Libtemplate($filename)

Creates a new HTML::Libtemplate object and expects the filename of the template file. Returns undef on error.


Sets a template variable to a value. Expects the name of the variable and the value.

$value = $tpl->getVar($name);

Returns a variable value. Expects the variable name.


Parses an template and prints the output to STDOUT. Returns undef on error.

$str = $tpl->parseToMem;

Parses a template and returns the output as a string. Returns undef on error.

In every error case $@ would have been set.

Christian Kruse
Last modified: Wed Oct 9 15:12:09 CEST 2002