NAME
Eidolon::Driver::Template::Toolkit - Eidolon Template::Toolkit driver.
SYNOPSIS
Somewhere in application controller:
my ($r, $tpl);
$r = Eidolon::Core::Registry->get_instance;
$tpl = $r->loader->get_object("Eidolon::Driver::Template::Toolkit");
$tpl->set
(
"TITLE" => "Example",
"CONTENT" => "Lorem ipsum dolor sit amet"
);
$r->cgi->send_header;
$tpl->parse("index.tpl");
$tpl->render;
DESCRIPTION
The Eidolon::Driver::Template::Toolkit is a template driver for Eidolon. It is based on famous Template::Toolkit package, that provides a lot of tasty functions for separating code and markup.
To use this driver you must have Template package installed.
METHODS
new($templates_dir, $additional)
Class constructor. $templates_dir
- directory with templates, $additional
- hash reference with additional options for Template::Toolkit.
set(%vars)
Inherited from "set(%vars)" in Eidolon::Driver::Template.
parse($tpl)
Implementation of abstract method from "parse($tpl)" in Eidolon::Driver::Template.
render()
Implementation of abstract method from "render()" in Eidolon::Driver::Template.
SEE ALSO
Eidolon, Eidolon::Driver::Template, Template
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
Anton Belousov, <abel@cpan.org>
COPYRIGHT
Copyright (c) 2009, Atma 7, http://www.atma7.com