CPAN::Meta::Converter - Online Linux Manual PageSection : 3
Updated : 2020-06-14
Source : perl v5.32.0
Note : Perl Programmers Reference Guide
NAMECPAN::Meta::Converter − Convert CPAN distribution metadata structures
VERSIONversion 2.150010
SYNOPSIS my $struct = decode_json_file('META.json');
my $cmc = CPAN::Meta::Converter−>new( $struct );
my $new_struct = $cmc−>convert( version => "2" );
DESCRIPTIONThis module converts CPAN Meta structures from one form to another. 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. (E.g. stripping all custom fields or stripping all optional fields.)
METHODS
new my $cmc = CPAN::Meta::Converter−>new( $struct );
The constructor should be passed a valid metadata structure but invalid structures are accepted. If no meta-spec version is provided, version 1.0 will be assumed. Optionally, you can provide a default_version argument after $struct: my $cmc = CPAN::Meta::Converter−>new( $struct, default_version => "1.4" );
This is only needed when converting a metadata fragment that does not include a meta−spec field.
convert my $new_struct = $cmc−>convert( version => "2" );
Returns a new hash reference with the metadata converted to a different form. convert will die if any conversion/standardization still results in an invalid structure. Valid parameters include: • version \*(-- Indicates the desired specification version (e.g. \*(L"1.0\*(R", \*(L"1.1\*(R" ... \*(L"1.4\*(R", \*(L"2\*(R"). Defaults to the latest version of the CPAN Meta Spec. Conversion proceeds through each version in turn. For example, a version 1.2 structure might be converted to 1.3 then 1.4 then finally to version 2. The conversion process attempts to clean-up simple errors and standardize data. For example, if author is given as a scalar, it will converted to an array reference containing the item. (Converting a structure to its own version will also clean-up and standardize.) When data are cleaned and standardized, missing or invalid fields will be replaced with sensible defaults when possible. This may be lossy or imprecise. For example, some badly structured META.yml files on CPAN have prerequisite modules listed as both keys and values: requires => { 'Foo::Bar' => 'Bam::Baz' }
These would be split and each converted to a prerequisite with a minimum version of zero. 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'. For example a missing or unrecognized license field will result in a license field of 'unknown'. Fields that may get an 'unknown' include: • abstract • author • license
upgrade_fragment my $new_struct = $cmc−>upgrade_fragment;
Returns a new hash reference with the metadata converted to the latest version of the CPAN Meta Spec. No validation is done on the result \*(-- you must validate after merging fragments into a complete metadata document. Available since version 2.141170.
BUGSPlease report any bugs or feature using the CPAN Request Tracker. Bugs can be submitted through the web interface at <http://rt.cpan.org/Dist/Display.html?Queue=CPAN−Meta> 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.
AUTHORS• David Golden <dagolden@cpan.org> • Ricardo Signes <rjbs@cpan.org> • Adam Kennedy <adamk@cpan.org>
COPYRIGHT AND LICENSEThis software is copyright (c) 2010 by David Golden, Ricardo Signes, Adam Kennedy and Contributors. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. 0
Johanes Gumabo
Data Size : 13,705 byte
man-CPAN::Meta::Converter.3Build : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 5 / 175,359
Visitor ID : :
Visitor IP : 18.220.134.161 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.
ERROR : Need New Coding : (parse_manual_page_|249|CPAN::Meta::Converter.3|36/37|el══─{─══.|.el══─{─══. ds -- \|\(em\|
) (htmlprn|149|CPAN::Meta::Converter.3|36/37|.el══─{─══. ds -- — |.el══─{─══. ds -- \|\(em\|
) (parse_manual_page_|249|CPAN::Meta::Converter.3|43|br══─}─══|'br══─}─══
) (htmlprn|149|CPAN::Meta::Converter.3|43|'br══─}─══ |'br══─}─══
) (rof_escape_sequence|91|CPAN::Meta::Converter.3|194|\*(-- Indicates the desired specification version (e.g. \*(L"1.0\*(R", \*(L"1.1\*(R" ... \*(L"1.4\*(R", \*(L"2\*(R"). |\&\f(CW\*(C`version\*(C'\fR \*(-- Indicates the desired specification version (e.g. \*(L"1.0\*(R", \*(L"1.1\*(R" ... \*(L"1.4\*(R", \*(L"2\*(R").
) (rof_escape_sequence|91|CPAN::Meta::Converter.3|233|\*(-- you must |of the \s-1CPAN\s0 Meta Spec. No validation is done on the result \*(-- you must
)