CGI::Lazy::Template - CGI::Lazy::Template documentation


CGI-Lazy documentation  | view source Contained in the CGI-Lazy distribution.

Index


LEGAL

Top

NAME

Top

CGI::Lazy::Template

SYNOPSIS

Top

	use CGI::Lazy;

	my $q = CGI::Lazy->new('/path/to/config/file');

	print $q->template('topbanner1.tmpl')->process({ mainTitle => 'Main Title', secondaryTitle => 'Secondary Title', versionTitle => 'version 0.1', messageTitle => 'blah blah blah', });

DESCRIPTION

Top

CGI::Lazy::Template is pretty much just a wrapper to HTML::Template. It takes a template name as its single argument, and has a single useful method: process, which takes a hashref of variables to shuffle together with the template for subsequent printing to the browser.

METHODS

Top

boilerplate (widget)

Returns a boilerplate object for generating boilerplate templates for widget. See CGI::Lazy::Template::Boilerplate for details.

widget

A CGI::Lazy widget of some kind.

config

Returns CGI::Lazy::Config object

q

Returns CGI::Lazy object.

new (q, template)

Constructor.

q

CGI::Lazy object

template

Template file name. File must be in the template directory as specified by the config file.

process (vars)

Shuffles values contained in vars together with template for output.

vars

hashref of variables expected by template


CGI-Lazy documentation  | view source Contained in the CGI-Lazy distribution.