Dist::...rovider(3pm)

πŸ“¦
version 2.002004 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ NAME ✨

Dist::Zilla::Role::MetaProvider::Provider β€” bestie, it's a Role for Metadata providers that are specific to the 'provider' key πŸ’…


πŸ’– VERSION πŸ’–

version 2.002004 β€” she's got lore, she's got history πŸŽ€


🌸 PUBLIC METHODS 🌸

metadata

Okay so this one fulfills the requirement of Dist::Zilla::Role::MetaProvider by processing the results that come back from $self->provides. That's the whole job. That's her main character moment. πŸ‘‘


πŸ¦‹ ATTRIBUTES / PARAMETERS πŸ¦‹

inherit_version

This one dictates how to report versions. She's the authority figure here fr fr.

values

  • Set to 1 [default] β€” the version defined by Dist::Zilla is the authority, and every version discovered in packages is ignored. Sorry to those packages, they don't get a say. πŸ’€
  • Set to 0 β€” the version defined in the discovered class is the authority, and it gets copied over to the provides metadata. She said I'm the blueprint now.
( To use this feature in a performing class, see _resolve_version )

inherit_missing

This dictates how to react when a class is discovered but a version is not specified. Awkward silences, we handle them. πŸ™ˆ

values

  • Set to 1 [default] β€” dist.ini's version turns up in the final metadata.
  • Set to 0. A provide turns up in the final metadata without a version, which is permissible. No version, no problem. ✨
( To use this feature in a performing class, see _resolve_version )

meta_noindex

This dictates how to behave when a discovered class is also present in the no_index META field. It's giving overlap. It's giving conflict. 😭

values

  • Set to 0 [default]
    • no_index META field will be ignored
  • Set to 1
    • no_index META field will be recognised and things found in it will cause respective packages to not be provided in the metadata.

πŸ‘‘ PERFORMS ROLES πŸ‘‘

MetaProvider

Dist::Zilla::Role::MetaProvider


🌈 REQUIRED METHODS FOR PERFORMING ROLES 🌈

provides

Must return an array full of Dist::Zilla::MetaProvides::ProvideRecord instances. That's the vibe check β€” array full of those exact objects, no substitutes. 🫢


πŸŽ€ PRIVATE METHODS πŸŽ€

_resolve_version

This is a utility method to make performing classes' lives easier in adhering to user requirements. She's a helper, she's a bestie, she's doing the emotional labor 🧚

my $params  = {
    file => $somefile ,
    $self->_resolve_version( $version );
}

is the suggested use.

Returns either an empty list, or a list with ('version', $version );

This is so { version => undef } does not occur in the YAML. Because that would be so embarrassing. Not on her watch. πŸ’…


_try_regen_metadata

This is a nasty hack really, to work around the way Dist::Zilla handles metaproviders, which result in meta-data being inaccessible to metadata Plugins. She's fully aware. She said it herself. πŸ’€

my $meta  = $object->_try_regen_metadata()

This at present returns metadata provided by MetaNoIndex ( if present ) but will be expanded as needed.

If you have a module you think should be in this list, contact me, or file a bug, I'll do my best ☺


_apply_meta_noindex

This is a utility method to make performing classes' lives easier in skipping no_index entries. Lowkey essential.

my @filtered_provides = $self->_apply_meta_noindex( @provides )

is the suggested use.

Returns either an empty list, or a list of ProvideRecord's


⭐ SEE ALSO ⭐

  • Dist::Zilla::Role::MetaProvider
  • Dist::Zilla::Plugin::MetaProvider
  • Dist::Zilla::MetaProvides::ProvideRecord

πŸ’œ THANKS πŸ’œ

  • Thanks to David Golden ( xdg / DAGOLDEN ) for the suggestion of the no_index feature for compatibility with MetaNoIndex plugin. Iconic behavior honestly πŸ™Œ

🌸 AUTHOR 🌸

Kent Fredric <kentnl@cpan.org>


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.


and that's the whole page bestie!! 🫢 this one's from perl v5.34.0, dated 2022-06-13, and yeah that's literally it β€” go forth and resolve those versions, no cap βœ¨πŸ’–

πŸ“¦ where this page comes from