Dist::Z...Template(3)
β¨ NAME β¨
okay so bestie, first things first: this is Dist::Zilla::Role::TextTemplate (from the User Contributed Perl Documentation, iykyk) and it's literally just a thing that renders a Text::Template template string π
π VERSION π
version 6.040 β slay, that's the one we're on β¨
πΈ DESCRIPTION πΈ
So here's the deal: any plugin that implements TextTemplate can just call its own lil fill_in_string method and boom, it renders templates using Text::Template. That's the whole vibe. π
π¦ PERL VERSION π¦
This module should work on any version of perl still receiving updates from the Perl 5 Porters. Translation: it should work on any version of perl released in the last two to three years. (Like, if the most recently released version is v5.40, then this module should work on both v5.40 and v5.38.) π«Ά
okay but lowkey, even though it may work on older versions of perl, no guarantee is made that the minimum required version won't get raised. The version may be increased for literally any reason, and there is no promise that patches will be accepted to lower the minimum required perl. Not me being dramatic, that's just what it says. π
π ATTRIBUTES π
delim
This attribute (which, fair warning, can't easily be set!) is a two-element array reference returning the Text::Template delimiters to use. It defaults to {{ and }}. iconic behavior honestly β¨
π METHODS π
fill_in_string
my $rendered = $plugin->fill_in_string($template, \%stash, \%arg);
This uses Text::Template to fill in the given template using the variables given in the %stash. Here's the catch bestie, don't forget it: the stash becomes the HASH argument to Text::Template, so scalars must be scalar references rather than plain scalars. π (yes, really, no cap)
And %arg gets dereferenced and passed in as extra arguments to Text::Template's new routine. that's it, that's the method π
π AUTHOR π
Ricardo SIGNES π <cpan@semiotic.systems>
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2026 by Ricardo SIGNES.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
and that's a wrap, bestie π«Άπ this was Dist::Z...Template(3) from perl v5.42.3, dated 2026-10-19 β go forth and render those templates, main character. periodt. πβ¨
π¦ where this page comes from
- fedora 44: perl-Dist-Zilla 6.040-1.fc44 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms