Dist::Zilla::Role::MetaProvider::Provider(3pm)

Dist::Zilla::Role::MetaProvider::Provider3pm

A role for metadata providers specific to the 'provider' key.

Version

version 2.002004

Public methods

"metadata"

Fulfills the requirement of Dist::Zilla::Role::MetaProvider by processing results returned from "$self->provides".

Attributes / parameters

"inherit_version"

This dictates how to report versions.

values

•

Set to "1" [default] The version defined by Dist::Zilla is the authority, and all versions discovered in packages are ignored.

•

Set to "0" The version defined in the discovered class is the authority, and it is copied to the provides metadata.

( 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.

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.

( 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.

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.

Private methods

"_resolve_version"

This is a utility method to make performing classes life easier in adhering to user requirements.

    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.

"_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.

  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 life easier in skipping no_index entries.

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

is the suggested use.

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

Thanks

•

Thanks to David Golden ( xdg / DAGOLDEN ) for the suggestion of the no_index feature for compatibility with MetaNoIndex plugin.

Releases

5 releases since Debian 9 (Stretch); the text changed 3 times.

  1. 9
  2. 10
  3. 11
  4. 12–13

Author

Kent Fredric <[email protected]>

From libdist-zilla-plugin-metaprovides-perl 2.002004-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.