Dist::Z...Prereqs(3)
π Dist::Z...Prereqs β the manual page, bestie edition π
okay so this is the Dist::Z...Prereqs(3) page from the User Contributed Perl Documentation. yes the name is literally abbreviated with dots like that, don't come for me. sit down, grab a boba, we're learning about prereqs. π§
β¨ NAME β¨
Dist::Zilla::Prereqs β bestie, it's the prerequisites of a Dist::Zilla distribution. that's it. that's the whole job. π
πΈ VERSION πΈ
version 6.040 β yes that's the number, don't @ me. π
π¦ DESCRIPTION π¦
okay so Dist::Zilla::Prereqs is a subcomponent of Dist::Zilla. think of it as, like, the little sister that handles one specific thing and handles it flawlessly.
the "prereqs" attribute on your Dist::Zilla object? that's a Dist::Zilla::Prereqs object. and its whole entire personality is keeping track of the distribution's prerequisites. it's giving responsible. it's giving organized. it's giving "i have a spreadsheet for that."
and here's the tea: a Dist::Zilla::Prereqs object is just a thin layer over a CPAN::Meta::Prereqs object, stored in the "cpan_meta_prereqs" attribute. thin. like, sheet-mask thin. not me describing architecture with skincare metaphors. π
almost everything this object does is proxied straight to the CPAN::Meta::Prereqs object, so fr fr, you should really go read how that one works. this one is the messenger. the messenger is not doing the heavy lifting.
so, specifically β Dist::Zilla::Prereqs proxies these methods to the CPAN::Meta::Prereqs object:
finalizeis_finalizedrequirements_foras_string_hash
that's the list. four of them. iconic little lineup. π
π PERL VERSION π
this module should work on any version of perl that's still getting updates from the Perl 5 Porters. translation? it should work on 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. periodt. β
now the caveat, and listen closely bestie:
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 don't build your whole life on an ancient perl and then act surprised. π
π METHODS π
π register_prereqs π
two ways to call it, and here they are, exactly as they are:
$prereqs->register_prereqs(%prereqs);
$prereqs->register_prereqs(\%arg, %prereqs);
this method adds new minimums to the prereqs object. new minimums. it's the bar-raiser. it's the "you must be at least this tall to ride" of the dependency world. π’
if a hashref is the first arg, it may have entries for "phase" and "type" to indicate what kind of prereqs are being registered. (for more information on phase and type, go see CPAN::Meta::Spec β that's the source of truth, i don't make the rules.)
for example, you might say:
$prereqs->register_prereqs(
{ phase => 'test', type => 'recommends' },
'Test::Foo' => '1.23',
'XML::YZZY' => '2.01',
);
look at that. clean. organized. Test::Foo needs at least 1.23, XML::YZZY needs at least 2.01, and we're registering them under phase test, type recommends. slay. π
and if you don't give them? if not given, phase and type default to runtime and requires, respectively. so the boring default is still doing something, lowkey. π«Ά
π AUTHOR π
Ricardo SIGNES π <cpan@semiotic.systems>
(he gets an emoji in his own author line and honestly? correct. main character energy.) β¨
π 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.
so yes, go forth, remix, redistribute, be free. πΈ
and that's the whole page, bestie!! this was Dist::Z...Prereqs(3) from perl v5.42.3, all dated 2026-10-19 β mwah, go register some prereqs and hydrate. ππ¦π
π¦ 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