1Test::CPAN::Meta::YAML(U3s)er Contributed Perl DocumentatTieosnt::CPAN::Meta::YAML(3)
2
3
4

NAME

6       Test::CPAN::Meta::YAML - Validate a META.yml file within a CPAN
7       distribution.
8

SYNOPSIS

10       There are two forms this module can be used.
11
12       The first is a standalone test of your distribution's META.yml file:
13
14         use Test::More;
15         eval "use Test::CPAN::Meta::YAML";
16         plan skip_all => "Test::CPAN::Meta::YAML required for testing META.yml" if $@;
17         meta_yaml_ok();
18
19       Note that you may provide an optional label/comment/message/etc to the
20       function, or one will be created automatically.
21
22       The second form allows you to test other META.yml files, or specify a
23       specific version you wish to test against:
24
25         use Test::More tests => 6;
26         use Test::CPAN::Meta::YAML;
27
28         # specify a file and specification version
29         meta_spec_ok('META.yml','1.3',$msg);
30
31         # specify the specification version to validate the local META.yml
32         meta_spec_ok(undef,'1.3',$msg);
33
34         # specify a file, where the specification version is deduced
35         # from the file itself
36         meta_spec_ok('META.yml',undef,$msg);
37
38       Note that this form requires you to specify the number of tests you
39       will be running in your test script. Also note that each "meta_spec_ok"
40       is actually two tests under the hood.
41

DESCRIPTION

43       This module was written to ensure that a META.yml file, provided with a
44       standard distribution uploaded to CPAN, meets the specifications that
45       slowly being introduced to module uploads, via the use of
46       ExtUtils::MakeMaker, Module::Build and Module::Install.
47
48       See CPAN::Meta for further details of the CPAN Meta Specification.
49

FUNCTIONS

51       •   meta_yaml_ok([$msg])
52
53           Basic META.yml wrapper around "meta_spec_ok".
54
55       •   meta_spec_ok($file, $version [,$msg])
56
57           Validates the named file against the given specification version.
58           Both $file and $version can be undefined.
59

TESTING META FILES

61       There are currently three distributions to test META files:
62
63       Test-CPAN-Meta
64       Test-CPAN-Meta-JSON
65       Test-CPAN-Meta-YAML
66
67       All three have slightly different requirements and are intended to be
68       used in slightly different environments.
69
70       Test-CPAN-Meta-YAML requires a YAML parser, and currently looks for the
71       YAML or YAML::Syck modules. This is the original variant of the three
72       and was intended to provide a more complete YAML validation of a
73       META.yml.
74
75       Test-CPAN-Meta requires the Parse::CPAN::Meta module, which is now part
76       of Perl Core as of perl-5.10.1. This version is intended to be used by
77       those only wishing to rely on core modules to test their META.yml
78       files.
79
80       Test-CPAN-Meta-JSON is the most recent addition to the family, and is
81       specifically aimed at those distributions that use a META.json Meta
82       file. The distribution requires the JSON module to parse the Meta file.
83

BUGS, PATCHES & FIXES

85       There are no known bugs at the time of this release. However, if you
86       spot a bug or are experiencing difficulties that are not explained
87       within the POD documentation, please send an email to barbie@cpan.org
88       or submit a bug to the RT system
89       (http://rt.cpan.org/Public/Dist/Display.html?Name=Test-CPAN-Meta-YAML).
90       However, it would help greatly if you are able to pinpoint problems or
91       even supply a patch.
92
93       Fixes are dependent upon their severity and my availability. Should a
94       fix not be forthcoming, please feel free to (politely) remind me.
95

SEE ALSO

97       Test::YAML::Valid
98       Test::CPAN::Meta
99       Test::CPAN::Meta::JSON
100       Test::CPAN::Meta::YAML
101

AUTHOR

103       Barbie, <barbie@cpan.org> for Miss Barbell Productions,
104       <http://www.missbarbell.co.uk>
105
107         Copyright (C) 2007-2015 Barbie for Miss Barbell Productions
108
109         This distribution is free software; you can redistribute it and/or
110         modify it under the Artistic Licence v2.
111
112
113
114perl v5.38.0                      2023-07-21         Test::CPAN::Meta::YAML(3)
Impressum