NAME
Modwheel::Template - Abstract factory class for Modwheel presentation engine drivers.
VERSION
v0.2.2
SYNOPSIS
my $template = Modwheel::Template->new({
modwheel => $modwheel,
db => $db,
user => $user,
repository => $repository,
object => $object
});
$db->connect or die "Couldn't connect to database: ". $db->errstr;
$template->init(input => 'myfile.html');
print $template->process();
$db->disconnect if $db->connected;
DESCRIPTION
Abstract loading of template drivers.
MORE INFORMATIOAN
Please see Modwheel::Template::Base
If you're using Template Toolkit as representation engine, see:
Modwheel::Template::TT::Plugin
This is the plugin you use in your Template Toolkit templates.
-
This is the driver that sets up and loads the Template Toolkit.
SUBROUTINES/METHODS
CONSTRUCTOR
Modwheel::Template->new({modwheel => $modwheel [...]})
-
This function creates a Template class based on the current template driver in the configuration. Either a templatedriver configured for the current site, or a templatedriver defined in the global configuration directive.
DIAGNOSTICS
Be sure that the module specified in the templatedriver: section of the coniguration file is installed and is loadable.
If the module name includes the characters '::', it will use the full module name, if it doesn't it will add Modwheel::Template:: to the front of the name. So if the module name is:
MyCompany::OurRepresentationEngine::ModwheelSupport
it will load that module. If the name is Mason however, it will load:
Modwheel::Template::Mason
CONFIGURATION AND ENVIRONMENT
See the templatedriver section of Modwheel::Manual::Config
DEPENDENCIES
Requires the module specified in the templatedriver: directive in the configuration to be installed.
INCOMPATIBILITIES
None.
BUGS AND LIMITATIONS
If you have a module that doesn't include '::' in the name, it will add Modwheel::Template:: to the name.
AUTHOR
Ask Solem, ask@0x61736b.net.
LICENSE AND COPYRIGHT
Copyright (C) 2007 by Ask Solem ask@0x61736b.net
.
All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.