Dist::Z...emplate(3)

πŸ’– NAME πŸ’–

Dist::Zilla::Plugin::GatherDir::Template β€” bestie, it gathers all the files in a directory and uses them as templates. Slay.


✨ VERSION ✨

version 6.040 β€” that's the one we're on, no cap.


πŸŽ€ DESCRIPTION πŸŽ€

okay so this one is a subclass of the GatherDir plugin. It does literally everything its parent class does, with one lil glow-up: every single gathered file gets run through Text::Template.

And because templates need stuff to chew on, you get two variables handed over: $plugin and $dist. Those are set to the GatherDir::Template plugin and the Dist::Zilla object respectively. 🫢

It's giving "made for dzil new" energy β€” that's when you're minting dists. But it lowkey works for building existing dists too, if that's your vibe.


πŸͺ PERL VERSION πŸͺ

This module should work on any version of perl still receiving updates from the Perl 5 Porters. Translation? Any version of perl released in the last two to three years. (So like, if the most recently released version is v5.40, then this module should work on both v5.40 and v5.38.) ✨

It may work on older versions of perl, but no guarantee is made that the minimum required version won't get bumped. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl. It's giving "we're moving forward, periodt." πŸ’…


πŸ‘‘ ATTRIBUTES πŸ‘‘

🌸 rename 🌸

Use this to rename files while they are being gathered. It's a list of key/value pairs, and you write them like this:

[GatherDir::Template]
rename.DISTNAME = $dist->name =~ s/...//r
rename.DISTVER  = $dist->version

So in this example, the tokens DISTNAME and DISTVER get replaced with the expressions they're associated with. And here's the iconic part β€” those expressions get treated as though they were miniature Text::Template sections, which means they receive the same variables the file itself receives, i.e. $dist and $plugin. πŸ’œ


πŸ’… 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.


okay and that's the whole vibe check, bestie πŸ¦‹ this was perl v5.42.3, dated 2026-10-19, and the manual is Dist::Z...emplate(3) β€” go forth and template your little heart out πŸ’–β­

πŸ“¦ where this page comes from