1Test::CPAN::Meta(3)   User Contributed Perl Documentation  Test::CPAN::Meta(3)
2
3
4

NAME

6       Test::CPAN::Meta - Validation of the META.yml file in 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";
16         plan skip_all => "Test::CPAN::Meta 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;
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       are slowly being introduced to module uploads, via the use of package
46       makers and installers such as ExtUtils::MakeMaker, Module::Build and
47       Module::Install.
48

ABSTRACT

50       A test module to validate a CPAN META.yml file.
51

FUNCTIONS

53       ·   meta_yaml_ok([$msg])
54
55           Basic META.yml wrapper around meta_spec_ok.
56
57           Returns a hash reference to the contents of the parsed META.yml
58
59       ·   meta_spec_ok($file, $version [,$msg])
60
61           Validates the named file against the given specification version.
62           Both $file and $version can be undefined.
63
64           Returns a hash reference to the contents of the given file, after
65           it has been parsed.
66

TESTING META FILES

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

BUGS, PATCHES & FIXES

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

SEE ALSO

103         Test::YAML::Valid
104

DSLIP

106         b - Beta testing
107         d - Developer
108         p - Perl-only
109         O - Object oriented
110         p - Standard-Perl: user may choose between GPL and Artistic
111

AUTHOR

113       Barbie, <barbie@cpan.org> for Miss Barbell Productions,
114       <http://www.missbarbell.co.uk>
115
117         Copyright (C) 2007-2010 Barbie for Miss Barbell Productions
118
119         This module is free software; you can redistribute it and/or
120         modify it under the same terms as Perl itself.
121
122
123
124perl v5.12.1                      2010-04-13               Test::CPAN::Meta(3)
Impressum