CPAN::Meta::X - Custom (x_*) keys in CPAN distribution metadata being used in the wild
This document describes version 0.008 of CPAN::Meta::X (from Perl distribution CPAN-Meta-X), released on 2022-10-28.
The CPAN distribution metadata specification allows custom keys (those that begin with x_ or X_) to be added to the metadata. This document tries to catalog the custom keys that are being used by CPAN authors.
x_
X_
In addition to custom metadata keys, this document also lists:
custom phases and relationships in the prereqs hash that are being used by people
custom keys in resources hash
A big structure recording information related to Dist::Zilla which presumably is used to build the current distribution. Some of the things being put in here include: perl version used to build the distribution, Dist::Zilla plugins used to build the distribution, and so on.
List of contributors in a release.
Examples:
TBD
References:
DAGOLDEN, https://perlmaven.com/how-to-add-list-of-contributors-to-the-cpan-meta-files
SZABGAB, https://github.com/book/CPANio/issues/7
List prerequisites for example scripts.
KENTNL, https://perlancar.wordpress.com/2016/12/28/x_-prereqs/
List scripts that are being provided in the distribution. The structure is modelled after the standard provides hash.
So say your distribution provides a "csv2json" script, your META.json would contain:
"x_provides_scripts": { "csv2json": { "version": "0.1", "file": "bin/csv2json" } }
TOBYINK, https://perlmonks.org/?node_id=11123240
Express that the current distribution is benchmarking the specified module.
PERLANCAR, https://perlancar.wordpress.com/2016/12/28/x_-prereqs/
Express that the current distribution is including the specified module in some list(s), e.g. an Acme::CPANModules list.
PERLANCAR, Dist::Zilla::Plugin::Acme::CPANModules
Express that the current distribution is mentioning the specified module.
Express that a distribution provides an alternate (implementation) for a module.
Example: Perinci::Access::Lite distribution specifies a runtime x_alt_for prereq relationship to Perinci::Access.
x_alt_for
IDEA: The more specific nature of alternate could be specified further in additional relationsip e.g. x_lightweight_alt_for, x_tiny_alt_for, x_windows_alt_for, etc, if needed.
x_lightweight_alt_for
x_tiny_alt_for
x_windows_alt_for
See "x_benchmarks phase".
Express that one of the modules in the current distribution is declaring features that are defined defined in an associated Module::Features::* module. Used with (phase=develop).
Module::Features::*
Examples: Text::ANSITable, Text::Table::More, and Text::Table::Sprintf declares features defined by Module::Features::TextTable so they add a dependency (phase=develop, rel=x_features_from) to Module::Features::TextTable.
Module::Features specification
See "x_lists phase".
See "x_mentions phase".
Express that the current distribution is following a specification defined in the specified module. Used with (phase=develop).
Please visit the project's homepage at https://metacpan.org/release/CPAN-Meta-X.
Source repository is at https://github.com/perlancar/perl-CPAN-Meta-X.
CPAN::Meta::Spec - Specification for CPAN distribution metadata
CPAN::Meta::X::Old
perlancar <perlancar@cpan.org>
To contribute, you can send patches by email/via RT, or send pull requests on GitHub.
Most of the time, you don't need to build the distribution yourself. You can simply modify the code, then test via:
% prove -l
If you want to build the distribution (e.g. to try to install it locally on your system), you can install Dist::Zilla, Dist::Zilla::PluginBundle::Author::PERLANCAR, Pod::Weaver::PluginBundle::Author::PERLANCAR, and sometimes one or two other Dist::Zilla- and/or Pod::Weaver plugins. Any additional steps required beyond that are considered a bug and can be reported to me.
This software is copyright (c) 2022, 2021 by perlancar <perlancar@cpan.org>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=CPAN-Meta-X
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
To install CPAN::Meta::X, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CPAN::Meta::X
CPAN shell
perl -MCPAN -e shell install CPAN::Meta::X
For more information on module installation, please visit the detailed CPAN module installation guide.