Eidolon::Driver::Template::Toolkit - Eidolon Template::Toolkit driver.
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;
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.
Class constructor. $templates_dir - directory with templates, $additional - hash reference with additional options for Template::Toolkit.
$templates_dir
$additional
Inherited from "set(%vars)" in Eidolon::Driver::Template.
Implementation of abstract method from "parse($tpl)" in Eidolon::Driver::Template.
Implementation of abstract method from "render()" in Eidolon::Driver::Template.
Eidolon, Eidolon::Driver::Template, Template
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Anton Belousov, <abel@cpan.org>
Copyright (c) 2009, Atma 7, http://www.atma7.com
To install Eidolon::Driver::Template::Toolkit, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Eidolon::Driver::Template::Toolkit
CPAN shell
perl -MCPAN -e shell install Eidolon::Driver::Template::Toolkit
For more information on module installation, please visit the detailed CPAN module installation guide.