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>


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