Dist::Zilla::Plugin::MetaProvides::Package - Extract namespaces/version from traditional packages for provides
version 2.003001
In your dist.ini:
dist.ini
[MetaProvides::Package] inherit_version = 0 ; optional inherit_missing = 0 ; optional meta_noindex = 1 ; optional
This is a Dist::Zilla Plugin that populates the provides property of META.json and META.yml by absorbing it from your shipped modules, in a manner similar to how PAUSE itself does it.
Dist::Zilla
provides
META.json
META.yml
PAUSE
This allows you to easily create an authoritative index of what module provides what version in advance of PAUSE indexing it, which PAUSE in turn will take verbatim.
Constructors: ->new(options={}) finder => Attribute:finder Attributes: ->finder # ArrayRef[Str] Methods: ->dumpconfig # HashRef ->has_finder # via finder ->mvp_multivalue_args # List ->provides -~- Inherited From: Dist::Zilla::Role::MetaProvider::Provider Constructors: ->new(options={}) inherit_version => Attribute:inherit_missing inherit_missing => Attribute:inherit_version meta_noindex => Attribute:meta_noindex Attributes: ->inherit_missing # Bool = 1 ->inherit_version # Bool = 1 ->meta_noindex # Bool = 1 Methods: ->dumpconfig # HashRef ->metadata # { provides => ... } -~- Inherited From: Dist::Zilla::Role::PPI Methods: ->document_assigns_to_variable(options=[]) # Bool 0 => $document # PPI::Document 1 => $variable_name # Varible name (w/sigil) ->ppi_document_for_file(options=[]) # PPI::Document 0 => $file # Dist::Zilla::Role::File ->save_ppi_document_to_file(options=[]) # PPI::Document 0 => $document # PPI::Document 1 => $file # Dist::Zilla::Role::File -~- Inherited From: Dist::Zilla::Role::MetaProvider -~- Inherited From: Dist::Zilla::Role::Plugin Constructors: ->new(options={}) plugin_name => Attribute:plugin_name zilla => Attribute:zilla logger => Attribute:logger Attributes: ->logger # ->plugin_name # Str ->zilla # DZil Methods: ->log # via logger ->log_debug # via logger ->log_fatal # via logger ->mvp_multivalue_args # ArrayRef ->mvp_aliases # HashRef ->plugin_from_config(options=[]) # Instance 0 => $name 1 => $arg 2 => $section ->register_component(options=[]) 0 => $name 1 => $arg 2 => $section
A conformant function to the Dist::Zilla::Role::MetaProvider::Provider Role.
finder
This attribute, if specified will
Override the FileFinder used to find files containing packages
FileFinder
Inhibit autovivification of the .pm file finder
.pm
This parameter may be specified multiple times to aggregate a list of finders
_package_blacklist
_finder_objects
_packages_for
_vivify_installmodules_pm_finder
_build_finder_objects
_found_files
inherit_version
How do you want existing versions ( Versions hard-coded into files before running this plug-in )to be processed?
DEFAULT: inherit_version = 1
Ignore anything you find in a file, and just probe DZIL->version() for a value. This is a sane default and most will want this.
DZIL->version()
inherit_version = 0
Use this option if you actually want to use hard-coded values in your files and use the versions parsed out of them.
inherit_missing
In the event you are using the aforementioned "inherit_version" = 0, this determines how to behave when encountering a module with no version defined.
"inherit_version" = 0
DEFAULT: inherit_missing = 1
When a module has no version, probe DZIL->version() for an answer. This is what you want if you want to have some files with fixed versions, and others to just automatically be maintained by Dist::Zilla.
inherit_missing = 0
When a module has no version, emit a versionless record in the final metadata.
meta_noindex
This is a utility for people who are also using MetaNoIndex, so that its settings can be used to eliminate items from the 'provides' list.
MetaNoIndex
meta_noindex = 0
With this set, any MetaNoIndex plugins are ignored.
DEFAULT: meta_noindex = 1
When a module meets the criteria provided to MetaNoIndex, eliminate it from the metadata shipped to Dist::Zilla.
Dist::Zilla::Plugin::MetaProvides
Kent Fredric <kentnl@cpan.org>
This software is copyright (c) 2015 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.
To install Dist::Zilla::Plugin::MetaProvides::Package, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dist::Zilla::Plugin::MetaProvides::Package
CPAN shell
perl -MCPAN -e shell install Dist::Zilla::Plugin::MetaProvides::Package
For more information on module installation, please visit the detailed CPAN module installation guide.