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

NAME

6       Test::YAML::Meta - Validation of the META.yml file in a distribution.
7

SYNOPSIS

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

DESCRIPTION

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

ABSTRACT

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

BUGS, PATCHES & FIXES

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

SEE ALSO

96         Test::YAML::Valid
97

DSLIP

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

AUTHOR

106       Barbie, <barbie@cpan.org> for Miss Barbell Productions,
107       <http://www.missbarbell.co.uk>
108
110         Copyright (C) 2007-2010 Barbie for Miss Barbell Productions
111
112         This module is free software; you can redistribute it and/or
113         modify it under the same terms as Perl itself.
114
115
116
117perl v5.12.1                      2010-04-13               Test::YAML::Meta(3)
Impressum