Dist::...rovides(3pm)
πΈ NAME πΈ
okay so bestie, welcome to Dist::Zilla::Plugin::MetaProvides β it's all about Generating and Populating 'provides' in your META.yml π
β¨ VERSION β¨
version 2.002004 β she's serving, she's current, she's that girl π
π SYNOPSIS π
okay real talk: this module is NOT meant to be used directly, no cap. Instead you drop one of the following sub-modules into your project's dist.ini and let it cook π
The most common usage β like, the one literally everybody reaches for β is:
[MetaProvides::Package]
and that alone is sufficient for indexing traditional Perl5 modules. iconic behaviour honestly π
Advanced Usage, for when you're feeling main-character:
; Traditional Perl5 Modules
[MetaProvides::Package]
inherit_version = 1 ; Default
inherit_missing = 1 ; Default
meta_noindex = 1 ; Default
; If using MooseX::Declare style "class" keywords.
; Default configuration shown
[MetaProvides::Class]
inherit_version = 1 ; Default
inherit_missing = 1 ; Default
meta_noindex = 1 ; Default
; Hand Constructed Provides in an external file
[MetaProvides::FromFile]
inherit_version = 1 ; Default
inherit_missing = 1 ; Default
file = some_file.ini ; mandatory flag
reader_name = Config::INI::Reader ;optional flag
And then, over in some_file.ini:
[Imaginary::Package]
file = lib/Imaginary/Package.pm ;mandatory flag
version = 3.1415 ;optional flag, subject to rules in dist.ini
π¦ DESCRIPTION π¦
This Distribution Contains a small bundle of plugins for various ways of populating the "META.yml" that is built with your distribution. yes, the capital letters are the original's, we respect the drama π
The initial reason for this is due to stuff that uses MooseX::Declare style class definitions not being parseable by many tools upstream π so this is here to cover this problem by defining it in the metadata. like, she exists to fix that specific situation. periodt.
π COMPONENT SUMMARY π
π "::Class"
Scans Dist::Zilla's ".pm" files and tries to identify classes using Class::Discover.
Dist::Zilla::Plugin::MetaProvides::Class
π "::Package"
Scans Dist::Zilla's ".pm" files and tries to identify more traditional packages using a combination of Module::Extract::VERSION and Module::Extract::Namespaces.
Dist::Zilla::Plugin::MetaProvides::Package
π "::FromFile"
In the event both of the above don't work for your needs, pull in hand-crafted metadata from a specified file π«Ά
Dist::Zilla::Plugin::MetaProvides::FromFile
β OPTION SUMMARY β
πΈ "inherit_version"
okay so the timing here is everything: at the time this plugin runs to collect metadata from files, the mungers won't have run yet to inject custom versions into files in the various locations. awkward, right? π
If you want the versions reported in the "provides" list to be consistent with the ones actually in the files, you will need to use this option in its enabled state.
IE: Generally, if you are using version munging, you WILL want this flag set to 1.
"values"
'0'β Do not inherit version from"Dist::Zilla"'1'[default] β Inherit version from Dist::Zilla
"inherit_version" in Dist::Zilla::Role::MetaProvider::Provider
πΈ "inherit_missing"
If for whatever reason you want to actually use the versions found in the modules where present, and fall back to the value from Dist::Zilla.
"inherit_version" will need to be turned off (0) for this to be effective. yep, you gotta flip one to use the other, that's the vibe check π§
values
'0'β Do not inherit version from"Dist::Zilla"when one is missing.'1'[default] β Inherit version from Dist::Zilla when one is missing.
"inhert_missing" in Dist::Zilla::Role::MetaProvider::Provider
yes bestie, that spelling is exactly what the original says β inhert_missing. not me fixing it. we keep the facts exactly as they are π
πΈ "meta_noindex"
This dictates how to behave when a discovered class is also present in the "no_index" META field.
values
'0'[default] β"no_index"META field will be ignored'1'β"no_index"META field will be recognised and things found in it will cause respective packages to not be provided in the metadata.
"meta_noindex" in Dist::Zilla::Role::MetaProvider::Provider
πΈ "file"
( Dist::Zilla::Plugin::MetaProvides::FromFile )
This is a mandatory parameter that points to the file that contains manually ( or otherwise ) crafted metadata to be integrated into your final META.yml
File Must exist. π (yes, mandatory mandatory. it's giving non-negotiable.)
πΈ "reader_name"
( Dist::Zilla::Plugin::MetaProvides::FromFile )
This parameter is by default Config::INI::Reader, but it can be in fact anything that meets the following criteria.
- Can be initialized an instance of
- has a
read_filemethod on the instance read_filecan take the parameter'file'read_filecan return a hashref matching the following structure
{ 'Package::Name' => {
'file' => '/path/to/file',
'version' => 0.1,
}}
π AUTHOR π
Kent Fredric <kentnl@cpan.org>
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2017 by Kent Fredric <kentfredric@gmail.com>.
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 that's the whole page bestie, you ate it up π«Ά this little bundle of joy is version 2.002004, documented under perl v5.34.0, dated 2022-06-13 β go forth and populate that META.yml πβ¨πΈ
π¦ where this page comes from
- debian bookworm: libdist-zilla-plugin-metaprovides-perl 2.002004-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libdist-zilla-plugin-metaprovides-perl 2.002004-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libdist-zilla-plugin-metaprovides-perl 2.002004-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libdist-zilla-plugin-metaprovides-perl 2.002004-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libdist-zilla-plugin-metaprovides-perl 2.002004-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms