Dist::Zilla::Plugin::MetaProvides::FromFile - Pull in hand-crafted metadata from a specified file.
version 2.001002
For a general overview of the MetaProvides family, see Dist::Zilla::Plugin::MetaProvides
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.
provides
[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, useless
And in some_file.ini
some_file.ini
[Foo::Package] file = some/module/path version = 0.1
Shared Logic with all MetaProvides Plugins. See "inherit_version" in Dist::Zilla::Plugin::MetaProvides
Shared Logic with all MetaProvides Plugins. See "inherit_missing" in Dist::Zilla::Plugin::MetaProvides
Shared Logic with all MetaProvides Plugins. See "meta_no_index" in Dist::Zilla::Plugin::MetaProvides
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.
Mandatory path to a file within your distribution, relative to the distribution root, to extract provides data from.
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
new
my $instance = $reader_name->new();
has a read_file method on the instance
read_file
my $result = $instance->read_file( ... )
read_file can take the parameter file
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', } }
::Role::MetaProvider::Provider
A conformant function to the ::Role::MetaProvider::Provider Role.
MetaProvides::ProvideRecord
[MetaProvides]
Kent Fredric <kentnl@cpan.org>
This software is copyright (c) 2017 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::FromFile, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dist::Zilla::Plugin::MetaProvides::FromFile
CPAN shell
perl -MCPAN -e shell install Dist::Zilla::Plugin::MetaProvides::FromFile
For more information on module installation, please visit the detailed CPAN module installation guide.