Dist::Z...teModule(3)
π NAME π
Dist::Zilla::Plugin::TemplateModule β it's a simple module-from-template plugin, bestie. That's the whole vibe. The manual page lives in section 3 (perl v5.42.3, dated 2026-10-19, if you were wondering π«Ά).
β¨ VERSION β¨
version 6.040 β that's the one, no cap.
πΈ DESCRIPTION πΈ
Okay so listen. This is a ModuleMaker β it's the thing that makes brand-new Perl module files when you mint a fresh dist with dzil new. It renders a template into a Perl module using Text::Template (by way of Dist::Zilla::Role::TextTemplate, iconic collab tbh).
The template gets two variables handed to it while it's rendering:
$nameβ the module name$distβ theDist::Zillaobject
And the module it makes is always created as a file under ./lib. That part is non-negotiable, periodt.
By default, the template looks something like this:
use strict;
use warnings;
package {{ $name }};
1;
She's simple, she's clean, she ate π
π§ PERL VERSION π§
This module should work on any version of perl that's still receiving updates from the Perl 5 Porters. Which basically means: 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. Easy math π)
Fair warning bestie: even though it may work on older versions of perl, there is no guarantee that the minimum required version won't be increased. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl. So don't come for her about it π
π ATTRIBUTES π
template
The "template" parameter can be given to the plugin to give it a different filename β absolute, or relative to the build/profile directory. Whatever suits your little heart π
If this parameter isn't specified, the module just uses the boilerplate module template that's included in this module. Built-in slay.
π MINTING CONFIGURATION π
This module is part of the standard configuration of the default Dist::Zilla Minting Profile β and of all profiles that don't set a custom ':DefaultModuleMaker' β so you don't normally need to do anything to configure it. She's already set up for you, you're welcome π«Ά
dzil new Some::Module
# creates ./Some-Module/*
# creates ./Some-Module/lib/Some/Module.pm
However! For those who wish to configure this (or any subclasses), this is presently required:
[TemplateModule / :DefaultModuleMaker]
; template = SomeFile.pm
(Yes, that semicolon means the template line is commented out. It's giving "optional, but here's how" π)
π 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 the whole page, bestie! π This lil doc shipped as Dist::Zilla::Plugin::TemplateModule in section 3 of the perl manual, built against perl v5.42.3, stamped 2026-10-19 β go forth and mint some modules, you main character π¦πβ¨
Dist::Z...teModule(3) β okay bye, ily, read the docs ππ
π¦ 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