Dist::Z...Prereqs(3)
π NAME π
Dist::Zilla::Plugin::Prereqs β bestie, it lists your simple prerequisites. That's the whole vibe. β¨
π VERSION π
version 6.040 β yes, she's got a version, she's official, she's that girl. π
πΈ SYNOPSIS πΈ
Okay so first things first, in your dist.ini you just do this:
[Prereqs]
Foo::Bar = 1.002
MRO::Compat = 10
Sub::Exporter = 0
And boom, prereqs. But WAIT β you can also ask for specific phases and relationships, like:
[Prereqs]
-phase = test
-relationship = recommends
Fitz::Fotz = 1.23
Text::SoundEx = 3
Not me giving you options, it's just what the plugin does. π
Now, importantggg: if you load two Prereqs plugins, each one needs its own name, added like this:
[Prereqs / PluginName]
-phase = test
-relationship = recommends
Fitz::Fotz = 1.23
Text::SoundEx = 3
Here's the β¨magicβ¨ part: if the name is the CamelCase concatenation of a phase and a relationship (or just a relationship, no phase needed), it sets those parameters implicitly. Iconic. But if you use a custom name and it doesn't specify the relationship, and you also didn't specify either -phase or -relationship... it throws the error No -phase or -relationship specified. And honestly? That's a good thing. It's there to stop a typo (that makes the name literally meaningless) from slipping by unnoticed. Mom behavior, but make it protective. π«Ά
So the example below is equivalent to the example above β only the name of the resulting plugin changes:
[Prereqs / TestRecommends]
Fitz::Fotz = 1.23
Text::SoundEx = 3
π¦ DESCRIPTION π¦
This module adds "fixed" prerequisites to your distribution. Fixed means these are prereqs with a known, fixed minimum version β one that does NOT change based on platform or literally any other condition. No cap. π₯
You can specify prerequisites for different phases and kinds of relationships. Take RuntimeRequires β the phase is Runtime, the relationship is Requires. And the way that all works in detail? It's described in the CPAN::Meta specification. Go read it, iykyk. π
The phases are:
configurebuildtestruntimedevelop
The relationship types are:
requiresrecommendssuggestsconflicts
And if the phase is omitted, it defaults to runtime β so putting Prereqs / Recommends in your dist.ini is literally equivalent to RuntimeRecommends. Slay. π
Lowkey important heads up: not all of these phases are useful for all tools, especially tools that only understand version 1.x CPAN::Meta files. So don't come for the tooling, bestie. π
β PERL VERSION β
This module should work on any version of perl 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. β¨)
And listen β although it may work on older versions of perl, no guarantee is made that the minimum required version will not 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 if you're on some ancient perl, that's a you problem, not a plugin problem. π
π SEE ALSO π
- Core Dist::Zilla plugins:
@Basic,AutoPrereqs. π - The CPAN Meta specification:
"PREREQUISITES" in CPAN::Meta.
π 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. π«Ά
aaaand that's the whole page, bestie π β written under perl v5.42.3, dated 2026-10-19, and yeah that header/footer thing said Dist::Z...Prereqs(3) because manpages love to truncate names and keep you guessing. mwah π
π¦ 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