Dear CPAN authors,
It is with great pleasure that we present you with the release of the CPAN Meta Spec version 2.
This document specifies the format for the next version of CPAN distribution metadata files – the META.yml and now META.json files found in most distributions on CPAN.
Version 2 is the result of a call for proposals last year that resulted in 34 proposals and over 300 discussion emails. The final proposal was reviewed by a working group consisting of the maintainers of most of the major Perl toolchain modules, administrators of the major CPAN indexing sites and representatives from several major linux distributions that package CPAN libraries.
The new release includes not only the actual specification but new support libraries for the toolchain to work with META files in a more consistent way.
As support is added to tools like Module::Build, Module::Install or Dist::Zilla over the coming months, CPAN authors will see several new options for providing additional information about their distributions.
Some notable changes to the specification include:
- use of JSON as the preferred serialization format (i.e. META.json)
- prereqs are more granular, allowing every “action” (e.g. ‘build’, ‘test’) to have every type of relationship (e.g. ‘requires’, ‘recommends’)
- adoption of Debian-inspired semantics for ‘recommends’ and ‘suggests’ for optional prereqs
- supports listing multiple licenses
- clearer rules for adding custom fields
- an indicator of release stability
- improved options for pointing to related resources, particularly code repositories
The specification version is also changing to an integer, so it can be the “major” number on CPAN::Meta and the decimals can reflect bug fixes or other non-specification changes to the library that implements any particular spec version.
Over the next month or so, we’ll be blogging about some of the details of the change.
Thank you to Ken Williams for creating the initial ‘META.yml’ spec and maintaining it through version 1.4 and thank you to everyone who contributed ideas, patches, discussion and critique in the development of the version 2 spec.
Ricardo Signes and David Golden