Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kentnl/dist-zilla-plugin-metaprovides-fromfile
In the event nothing else works, pull in hand-crafted metadata from a specified file
https://github.com/kentnl/dist-zilla-plugin-metaprovides-fromfile
Last synced: 4 days ago
JSON representation
In the event nothing else works, pull in hand-crafted metadata from a specified file
- Host: GitHub
- URL: https://github.com/kentnl/dist-zilla-plugin-metaprovides-fromfile
- Owner: kentnl
- License: other
- Created: 2010-07-24T13:28:12.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2017-03-07T14:17:43.000Z (over 7 years ago)
- Last Synced: 2024-06-21T03:23:23.672Z (5 months ago)
- Language: Perl
- Homepage:
- Size: 306 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.mkdn
- Changelog: Changes
- License: LICENSE
Awesome Lists containing this project
README
# NAME
Dist::Zilla::Plugin::MetaProvides::FromFile - Pull in hand-crafted metadata from a specified file.
# VERSION
version 2.001003
# SYNOPSIS
For a general overview of the `MetaProvides` family, see
[Dist::Zilla::Plugin::**MetaProvides**](https://metacpan.org/pod/Dist::Zilla::Plugin::MetaProvides)This module is tailored to the situation where probing various files for `provides` data is not possible, and you just want to
declare some in an external file.[MetaProvides::FromFile]
inherit_version = 0 ; optional, default = 1
inherit_missing = 0 ; optional, default = 1
file = some_file.ini ; required
reader_name = Config::INI::Reader ; optional, default = Config::INI::Reader
meta_no_index ; optional, uselessAnd in `some_file.ini`
[Foo::Package]
file = some/module/path
version = 0.1# OPTION SUMMARY
## inherit\_version
Shared Logic with all MetaProvides Plugins. See ["inherit\_version" in Dist::Zilla::Plugin::MetaProvides](https://metacpan.org/pod/Dist::Zilla::Plugin::MetaProvides#inherit_version)
## inherit\_missing
Shared Logic with all MetaProvides Plugins. See ["inherit\_missing" in Dist::Zilla::Plugin::MetaProvides](https://metacpan.org/pod/Dist::Zilla::Plugin::MetaProvides#inherit_missing)
## meta\_no\_index
Shared Logic with all MetaProvides Plugins. See ["meta\_no\_index" in Dist::Zilla::Plugin::MetaProvides](https://metacpan.org/pod/Dist::Zilla::Plugin::MetaProvides#meta_no_index)
However, given you're hard-coding the 'provides' map in the source file, and given that parameter
is intended to exclude _discovered_ modules from being indexed, it seems like the smart option would
be to simply delete the unwanted entries from the source file.## file
Mandatory path to a file within your distribution, relative to the distribution root, to extract `provides` data from.
## reader\_name
A class that can be used to read the named file. Defaults to Config::INI::Reader.
It can be substituted by any class name that matches the following criteria
- Can be instantiated via `new`
my $instance = $reader_name->new();
- has a `read_file` method on the instance
my $result = $instance->read_file( ... )
- `read_file` can take the parameter `file`
my $result = $instance->read_file( file => 'path/to/file' )
- `read_file` returns a hashref matching the following structure
{ 'Package::Name' => {
file = 'path/to/file',
version => '0.1',
} }# ROLES
## [`::Role::MetaProvider::Provider`](https://metacpan.org/pod/Dist::Zilla::Role::MetaProvider::Provider)
# PLUGIN FIELDS
## file
### type: required, ro, Str
## reader\_name
### type: Str, ro.
### default: Config::INI::Reader
# PRIVATE PLUGIN FIELDS
## \_reader
### type: Object, ro, built from ["reader\_name"](#reader_name)
# ROLE SATISFYING METHODS
## provides
A conformant function to the [`::Role::MetaProvider::Provider`](https://metacpan.org/pod/Dist::Zila::Role::MetaProvider::Provider) Role.
### signature: $plugin->provides()
### returns: Array of [`MetaProvides::ProvideRecord`](https://metacpan.org/pod/Dist::Zilla::MetaProvides::ProvideRecord)
# BUILDER METHODS
## \_build\_\_reader
# SEE ALSO
- [`[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.