Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kentnl/dist-zilla-plugin-metaprovides
Generating and Populating 'provides' in your META.yml
https://github.com/kentnl/dist-zilla-plugin-metaprovides
dist-zilla perl
Last synced: 4 days ago
JSON representation
Generating and Populating 'provides' in your META.yml
- Host: GitHub
- URL: https://github.com/kentnl/dist-zilla-plugin-metaprovides
- Owner: kentnl
- License: other
- Created: 2009-06-01T16:12:09.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2017-03-01T12:19:51.000Z (over 7 years ago)
- Last Synced: 2024-06-18T18:46:16.080Z (5 months ago)
- Topics: dist-zilla, perl
- Language: Perl
- Homepage:
- Size: 749 KB
- Stars: 3
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.mkdn
- Changelog: Changes
- Contributing: CONTRIBUTING.pod
- License: LICENSE
Awesome Lists containing this project
README
# NAME
Dist::Zilla::Plugin::MetaProvides - Generating and Populating 'provides' in your META.yml
# VERSION
version 2.002005
# SYNOPSIS
This module is not intended to be used directly, but instead, one of the following sub-modules should be used in your projects dist.ini
The most common usage should find
[MetaProvides::Package]
Sufficient for indexing traditional Perl5 modules.
Advanced Usage:
; 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 ; Defaultfile = some_file.ini ; mandatory flag
reader_name = Config::INI::Reader ;optional flagAnd then 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.The initial reason for this is due to stuff that uses [MooseX::Declare](https://metacpan.org/pod/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.# COMPONENT SUMMARY
## `::Class`
Scans [Dist::Zilla](https://metacpan.org/pod/Dist::Zilla)'s `.pm` files and tries to identify classes using
[Class::Discover](https://metacpan.org/pod/Class::Discover).[Dist::Zilla::Plugin::MetaProvides::Class](https://metacpan.org/pod/Dist::Zilla::Plugin::MetaProvides::Class)
## `::Package`
Scans [Dist::Zilla](https://metacpan.org/pod/Dist::Zilla)'s `.pm` files and tries to identify more traditional
packages using a combination of [Module::Extract::VERSION](https://metacpan.org/pod/Module::Extract::VERSION) and
[Module::Extract::Namespaces](https://metacpan.org/pod/Module::Extract::Namespaces).[Dist::Zilla::Plugin::MetaProvides::Package](https://metacpan.org/pod/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](https://metacpan.org/pod/Dist::Zilla::Plugin::MetaProvides::FromFile)
# OPTION SUMMARY
## `inherit_version`
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.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](https://metacpan.org/pod/Dist::Zilla)
["inherit\_version" in Dist::Zilla::Role::MetaProvider::Provider](https://metacpan.org/pod/Dist::Zilla::Role::MetaProvider::Provider#inherit_version)
## `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](https://metacpan.org/pod/Dist::Zilla).`inherit_version` will need to be turned off (`0`) for this to be effective.
### values
- `'0'`
Do not inherit version from `Dist::Zilla` when one is missing.
- `'1'` **\[default\]**
Inherit version from [Dist::Zilla](https://metacpan.org/pod/Dist::Zilla) when one is missing.
["inhert\_missing" in Dist::Zilla::Role::MetaProvider::Provider](https://metacpan.org/pod/Dist::Zilla::Role::MetaProvider::Provider#inhert_missing)
## `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](https://metacpan.org/pod/Dist::Zilla::Role::MetaProvider::Provider#meta_noindex)
## `file`
( [Dist::Zilla::Plugin::MetaProvides::FromFile](https://metacpan.org/pod/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.ymlFile Must exist.
## `reader_name`
( [Dist::Zilla::Plugin::MetaProvides::FromFile](https://metacpan.org/pod/Dist::Zilla::Plugin::MetaProvides::FromFile) )
This parameter is by default [Config::INI::Reader](https://metacpan.org/pod/Config::INI::Reader), but it can be in fact anything
that meets the following criteria.- Can be initialized an instance of
- has a read\_file method on the instance
- read\_file can take the parameter 'file'
- read\_file can return a hashref matching the following structure{ 'Package::Name' => {
'file' => '/path/to/file',
'version' => 0.1,
}}# AUTHOR
Kent Fredric
# COPYRIGHT AND LICENSE
This software is copyright (c) 2017 by Kent Fredric .
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.