arablobi.blogg.se

Metadata converter
Metadata converter




metadata converter
  1. Metadata converter Patch#
  2. Metadata converter software#
  3. Metadata converter license#

This software is copyright (c) 2010 by David Golden, Ricardo Signes, Adam Kennedy and Contributors.

Metadata converter Patch#

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. Bugs can be submitted through the web interface at Please report any bugs or feature using the CPAN Request Tracker. No validation is done on the result - you must validate after merging fragments into a complete metadata document. Returns a new hash reference with the metadata converted to the latest version of the CPAN Meta Spec. #upgrade_fragment my $new_struct = $cmc->upgrade_fragment Fields that may get an 'unknown' include:

Metadata converter license#

For example a missing or unrecognized license field will result in a license field of 'unknown'. When some mandatory fields are missing or invalid, the conversion will attempt to provide a sensible default or will fill them with a value of 'unknown'. These would be split and each converted to a prerequisite with a minimum version of zero. For example, some badly structured META.yml files on CPAN have prerequisite modules listed as both keys and values: requires => When data are cleaned and standardized, missing or invalid fields will be replaced with sensible defaults when possible. (Converting a structure to its own version will also clean-up and standardize.) For example, if author is given as a scalar, it will converted to an array reference containing the item. The conversion process attempts to clean-up simple errors and standardize data. For example, a version 1.2 structure might be converted to 1.3 then 1.4 then finally to version 2. Defaults to the latest version of the CPAN Meta Spec.Ĭonversion proceeds through each version in turn. Version - Indicates the desired specification version (e.g. convert will die if any conversion/standardization still results in an invalid structure. Returns a new hash reference with the metadata converted to a different form. #convert my $new_struct = $cmc->convert( version => "2" ) This is only needed when converting a metadata fragment that does not include a meta-spec field. Optionally, you can provide a default_version argument after $struct: my $cmc = CPAN::Meta::Converter->new( $struct, default_version => "1.4" ) If no meta-spec version is provided, version 1.0 will be assumed. The constructor should be passed a valid metadata structure but invalid structures are accepted. stripping all custom fields or stripping all optional fields.) #METHODS #new my $cmc = CPAN::Meta::Converter->new( $struct ) The primary use is to convert older structures to the most modern version of the specification, but other transformations may be implemented in the future as needed. This module converts CPAN Meta structures from one form to another. My $new_struct = $cmc->convert( version => "2" ) #DESCRIPTION My $cmc = CPAN::Meta::Converter->new( $struct ) Version 2.150010 #SYNOPSIS my $struct = decode_json_file('META.json') CPAN::Meta::Converter - Convert CPAN distribution metadata structures #VERSION






Metadata converter