Templa...::Mojo(3pm)
π Template::Provider::Mojo π
okay bestie, so this is a page from the User Contributed Perl Documentation collection, and it's literally the manual for Template::Provider::Mojo, which lives in the 3pm section (that's the perl module manual section, iykyk). it's giving "let Mojolicious do the template heavy lifting" and honestly? iconic. π
β¨ NAME β¨
Template::Provider::Mojo β use Mojolicious to provide templates π¦
πΈ SYNOPSIS πΈ
my $app = Mojolicious->new;
$provider = Template::Provider::Mojo->new({MOJO_RENDERER => $app->renderer});
($template, $error) = $provider->fetch($name);
no cap, that's the whole vibe right there π«Ά
π DESCRIPTION π
so Template::Provider::Mojo is a subclass of Template::Provider β a glow-up, if you will β and it uses a Mojolicious::Renderer instance to resolve template names. main character energy fr fr. π
what that actually means for you:
"paths"inMojolicious::Rendererget searched for file-based templates π"classes"inMojolicious::Rendererget searched for DATA templates ποΈ- the
"ENCODING"configuration setting gets initialized to"encoding"inMojolicious::Rendererif it's unset β so if you didn't set it, it gets set for you, slay β¨
π METHODS π
Template::Provider::Mojo inherits all the methods from Template::Provider, and then implements these new ones. it's giving "family recipes plus my own secret sauce" ππ
π§ fetch
returns a compiled template for the name you specify. for all the usage details, go check out "fetch($name)" in Template::Provider. literally just peek over there, it's all there π₯
π¦ load
loads a template without parsing or compiling it. this one is used by the INSERT directive β so it's the lowkey workhorse behind the scenes, no parsing, no compiling, just vibes πβ¨
π BUGS π
found something broken? report any issues on the public bugtracker. not me asking you to file a bug report but also yes me asking you to file a bug report ππ«Ά
π AUTHOR π
Dan Book <dbook@cpan.org> β legend behaviour, periodt π
π COPYRIGHT AND LICENSE π
this software is Copyright (c) 2015 by Dan Book.
it's free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
so yes bestie, you can use it, it's GPL compatible, go off π
β SEE ALSO β
TemplateMojolicious::RendererMojolicious::Plugin::TemplateToolkit
and that's the whole page, bestie!! this was documented for perl v5.36.0, dated 2023-02-24, and the original header/footer called it Templa...::Mojo(3pm) because even manpage titles get truncated sometimes ππ mwah, go build something cute with it π«Άβ¨
π¦ where this page comes from
- debian trixie: libmojolicious-plugin-templatetoolkit-perl 0.006-2 Β· Artistic-2.0
- ubuntu noble: libmojolicious-plugin-templatetoolkit-perl 0.006-2 Β· Artistic-2.0
- ubuntu resolute: libmojolicious-plugin-templatetoolkit-perl 0.006-2 Β· Artistic-2.0
- ubuntu stonking: libmojolicious-plugin-templatetoolkit-perl 0.006-2 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms