Template::Provider::Mojo - Use Mojolicious to provide templates
my $app = Mojolicious->new; $provider = Template::Provider::Mojo->new({MOJO_RENDERER => $app->renderer}); ($template, $error) = $provider->fetch($name);
Template::Provider::Mojo is a Template::Provider subclass that uses a Mojolicious::Renderer instance to resolve template names. This means that "paths" in Mojolicious::Renderer will be searched for file-based templates, and "classes" in Mojolicious::Renderer will be searched for DATA templates. The ENCODING configuration setting will be initialized to "encoding" in Mojolicious::Renderer if unset.
ENCODING
Template::Provider::Mojo inherits all methods from Template::Provider and implements the following new ones.
Returns a compiled template for the name specified. See "fetch($name)" in Template::Provider for usage details.
Loads a template without parsing or compiling it. This is used by the INSERT directive.
Report any issues on the public bugtracker.
Dan Book <dbook@cpan.org>
This software is Copyright (c) 2015 by Dan Book.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
Template, Mojolicious::Renderer, Mojolicious::Plugin::TemplateToolkit
To install Mojolicious::Plugin::TemplateToolkit, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious::Plugin::TemplateToolkit
CPAN shell
perl -MCPAN -e shell install Mojolicious::Plugin::TemplateToolkit
For more information on module installation, please visit the detailed CPAN module installation guide.