Template::Provider::Mojo3pm
Use mojolicious to provide templates
Usage
my $app = Mojolicious->new;$provider = Template::Provider::Mojo->new({MOJO_RENDERER => $app->renderer});($template, $error) = $provider->fetch($name);
Overview
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.
Methods
Template::Provider::Mojo inherits all methods from Template::Provider and implements the following new ones.
fetch
Returns a compiled template for the name specified. See "fetch($name)" in Template::Provider for usage details.
load
Loads a template without parsing or compiling it. This is used by the INSERT directive.
Copyright and license
This software is Copyright (c) 2015 by Dan Book.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)