Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kentnl/dist-zilla-plugin-metaprovides-package
Extract namespaces/version from traditional packages for provides
https://github.com/kentnl/dist-zilla-plugin-metaprovides-package
dist-zilla perl
Last synced: about 1 month ago
JSON representation
Extract namespaces/version from traditional packages for provides
- Host: GitHub
- URL: https://github.com/kentnl/dist-zilla-plugin-metaprovides-package
- Owner: kentnl
- License: other
- Created: 2010-07-24T11:41:55.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2017-03-01T12:53:53.000Z (almost 8 years ago)
- Last Synced: 2024-06-18T16:53:25.053Z (6 months ago)
- Topics: dist-zilla, perl
- Language: Perl
- Homepage:
- Size: 778 KB
- Stars: 2
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.mkdn
- Changelog: Changes
- Contributing: CONTRIBUTING.pod
- License: LICENSE
Awesome Lists containing this project
README
# NAME
Dist::Zilla::Plugin::MetaProvides::Package - Extract namespaces/version from traditional packages for provides
# VERSION
version 2.004004
# SYNOPSIS
In your `dist.ini`:
[MetaProvides::Package]
; This is the (optional) default: This forces any package versions
; added in the "provides" metadata to use the 'version'
; specified by dzil.
;
; Set it to 0 to force packages own versions to be respected. ( You probably don't want this )
inherit_version = 1; This is also the (optional) default: This forces any package without
; a version declaration to use the 'version' specified by default.
;
; Set it to 0 to allow packages to have no versions
inherit_missing = 1; This is the (optional) default: This being true discovers any [MetaNoIndex]
; plugins to also further exclude packages from the provides map.
;
; Set it to 0 if for some weird reason you don't want this.
meta_noindex = 1; This is the (optional) default: Packages named _Foo::Bar or Foo::_Bar are not indexed.
; Set this to 1 to enable indexing of similarly named packages.
include_underscores = 0# DESCRIPTION
This is a [`Dist::Zilla`](https://metacpan.org/pod/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.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.# CONSUMED ROLES
## [Dist::Zilla::Role::MetaProvider::Provider](https://metacpan.org/pod/Dist::Zilla::Role::MetaProvider::Provider)
# ROLE SATISFYING METHODS
## `provides`
A conformant function to the [Dist::Zilla::Role::MetaProvider::Provider](https://metacpan.org/pod/Dist::Zilla::Role::MetaProvider::Provider) Role.
### signature: $plugin->provides()
### returns: Array of [Dist::Zilla::MetaProvides::ProvideRecord](https://metacpan.org/pod/Dist::Zilla::MetaProvides::ProvideRecord)
# ATTRIBUTES
## `include_underscores`
This attribute controls automatic skipping of packages.
By default, `MetaProvides::Package` skips packages matching the following regular expression:
qr/(\A|::)_/
Setting this attribute to a `true` value will avoid skipping these packages.
This feature was added in `2.004001-TRIAL`
## `finder`
This attribute, if specified will
- Override the `FileFinder` used to find files containing packages
- Inhibit autovivification of the `.pm` file finderThis parameter may be specified multiple times to aggregate a list of finders
# OPTIONS INHERITED FROM [Dist::Zilla::Role::MetaProvider::Provider](https://metacpan.org/pod/Dist::Zilla::Role::MetaProvider::Provider)
## [`inherit_version`](https://metacpan.org/pod/Dist::Zilla::Role::MetaProvider::Provider#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.
- 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`](https://metacpan.org/pod/Dist::Zilla::Role::MetaProvider::Provider#inherit_missing)
In the event you are using the aforementioned `["inherit_version"](#inherit_version) = 0`, this determines how to behave when encountering a
module with no version defined.- 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`](https://metacpan.org/pod/Dist::Zilla::Role::MetaProvider::Provider#meta_noindex)
This is a utility for people who are also using [`MetaNoIndex`](https://metacpan.org/pod/Dist::Zilla::Plugin::MetaNoIndex),
so that its settings can be used to eliminate items from the 'provides' list.- meta\_noindex = 0
With this set, any `MetaNoIndex` plugins are ignored.
- DEFAULT: meta\_noindex = 1
When a module meets the criteria provided to [`MetaNoIndex`](https://metacpan.org/pod/Dist::Zilla::Plugin::MetaNoIndex),
eliminate it from the metadata shipped to [Dist::Zilla](https://metacpan.org/pod/Dist::Zilla).# SEE ALSO
- [Dist::Zilla::Plugin::MetaProvides](https://metacpan.org/pod/Dist::Zilla::Plugin::MetaProvides)
# 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.