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:

  • configure
  • build
  • test
  • runtime
  • develop

The relationship types are:

  • requires
  • recommends
  • suggests
  • conflicts

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>


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