Module...n::TT2(3pm)
π Module::Starter::Plugin::TT2 β the manual page, but make it make sense π
okay bestie, so this is the Module::Starter::Plugin::TT2 page, and it lives in section 3pm of the User Contributed Perl Documentation. That's the whole vibe. Sit down, grab a strawberry π, and let's get into it.
β¨ NAME β¨
Module::Starter::Plugin::TT2 β it's the TT2 templates plug for Module::Starter::Template. That's it, that's the name, iconic.
πΈ VERSION πΈ
version 0.125
π¦ SYNOPSIS π¦
use Module::Starter qw(
Module::Starter::Simple
Module::Starter::Plugin::Template
Module::Starter::Plugin::TT2
...
);
Module::Starter->create_distro( ... );
that's literally all you need to see. so clean.
π DESCRIPTION π
so here's the tea: this Module::Starter plugin is intended to be loaded after Module::Starter::Plugin::Template. like, order matters, bestie, don't come for me.
it implements the renderer and render methods β the ones the Template plugin requires, no cap β and it implements them using Template Toolkit. so TT2 does the heavy lifting and honestly? she ate. π₯
π EXAMPLES π
this module's distribution ships with a directory, templates/dir, and a file, templates/inline, and they're full of stock templates for using with the InlineStore and DirStore plugins. your starter pack, fr fr. π
on Debian systems, those files get installed in /usr/share/doc/libmodule-starter-plugin-tt2-perl/examples
and the module itself? she's carrying default templates for the ModuleStore plugin, tucked right there in her data section. self-sufficient queen. π
π§ USAGE π§
this module is meant to be used with the template stores in the SimpleStore distribution β though lowkey you could absolutely write your own template store, nobody's stopping you, do your thing. π
if all you want is the built-in templates, your config file (~/.module-starter/config) could have lines like this:
author: Lord Poncemby
email: ponce@peerage.eng
plugins: Module::Starter::Simple Module::Starter::Plugin::Template
Module::Starter::Plugin::ModuleStore Module::Starter::Plugin::TT2
template_module: Module::Starter::Plugin::TT2
(and yes β the plugins line is one line, the wrap is just the page being dramatic.)
what this does is tell Module::Starter to go look for the templates in the data section of Module::Starter::Plugin::TT2. whichβ¦ isn't very interesting, ngl π because you'll end up getting the exact same effect as if you'd just used Module::Starter with no plugins at all. it's giving "did all that for nothing".
to override this behavior, you'd tell Module::Starter to look somewhere else. three routes, pick your fighter:
- change the
template_modulesetting - change the
MODULE_TEMPLATE_MODULEenvironment variable - or use a totally different template store altogether (q.v., SimpleStore or other plugins)
and if you need to send parameters to the Template constructor, put them in the template_parms parameter of the create_distro method. β οΈ it must be a hash reference. not optional, not negotiable, hash reference or bust. π«Ά
π METHODS π
renderer
as implemented, this method just creates a brand-new Template Toolkit engine and stores it in the Module::Starter object. that's the whole job. she's efficient. β
render( $template, \%options )
this method passes the given template contents and options along to the TT2 renderer, and returns the resulting document. in one side, out the other. slay. β¨
π AUTHOR π
Ricardo SIGNES, "<rjbs@cpan.org>"
πΈ COPYRIGHT πΈ
Copyright 2004-2006 Ricardo SIGNES, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
okay and that's the page, bestie π¦ shoutout to perl v5.36.0 and the date 2022-12-06 for stamping this whole thing, and to Module...n::TT2(3pm) β yes the header is literally cut off like that, the terminal did her best, we love her anyway. go build a distro. periodt. π
π
π¦ where this page comes from
- debian bookworm: libmodule-starter-plugin-tt2-perl 0.125-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libmodule-starter-plugin-tt2-perl 0.125-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libmodule-starter-plugin-tt2-perl 0.125-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libmodule-starter-plugin-tt2-perl 0.125-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libmodule-starter-plugin-tt2-perl 0.125-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms