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 test => 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 2 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

ABSTRACT

51       A test module to validate a META.yml file.
52

FUNCTIONS

54       ·   meta_yaml_ok([$msg])
55
56           Basic META.yml wrapper around meta_spec_ok.
57
58       ·   meta_spec_ok($file, $version [,$msg])
59
60           Validates the named file against the given specification version.
61           Both $file and $version can be undefined.
62

TESTING META FILES

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

BUGS, PATCHES & FIXES

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

SEE ALSO

99         Test::YAML::Valid
100

DSLIP

102         b - Beta testing
103         d - Developer
104         p - Perl-only
105         O - Object oriented
106         p - Standard-Perl: user may choose between GPL and Artistic
107

AUTHOR

109       Barbie, <barbie@cpan.org> for Miss Barbell Productions,
110       <http://www.missbarbell.co.uk>
111
113         Copyright (C) 2007-2011 Barbie for Miss Barbell Productions
114
115         This module is free software; you can redistribute it and/or
116         modify it under the Artistic Licence v2.
117
118
119
120perl v5.12.3                      2011-02-13         Test::CPAN::Meta::YAML(3)
Impressum