.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Test::CPAN::Meta::YAML 3pm" .TH Test::CPAN::Meta::YAML 3pm "2022-06-17" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Test::CPAN::Meta::YAML \- Validate a META.yml file within a CPAN distribution. .SH "SYNOPSIS" .IX Header "SYNOPSIS" There are two forms this module can be used. .PP The first is a standalone test of your distribution's \fI\s-1META\s0.yml\fR file: .PP .Vb 4 \& use Test::More; \& eval "use Test::CPAN::Meta::YAML"; \& plan skip_all => "Test::CPAN::Meta::YAML required for testing META.yml" if $@; \& meta_yaml_ok(); .Ve .PP Note that you may provide an optional label/comment/message/etc to the function, or one will be created automatically. .PP The second form allows you to test other \fI\s-1META\s0.yml\fR files, or specify a specific version you wish to test against: .PP .Vb 2 \& use Test::More tests => 6; \& use Test::CPAN::Meta::YAML; \& \& # specify a file and specification version \& meta_spec_ok(\*(AqMETA.yml\*(Aq,\*(Aq1.3\*(Aq,$msg); \& \& # specify the specification version to validate the local META.yml \& meta_spec_ok(undef,\*(Aq1.3\*(Aq,$msg); \& \& # specify a file, where the specification version is deduced \& # from the file itself \& meta_spec_ok(\*(AqMETA.yml\*(Aq,undef,$msg); .Ve .PP Note that this form requires you to specify the number of tests you will be running in your test script. Also note that each \f(CW\*(C`meta_spec_ok\*(C'\fR is actually two tests under the hood. .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module was written to ensure that a \fI\s-1META\s0.yml\fR file, provided with a standard distribution uploaded to \s-1CPAN,\s0 meets the specifications that slowly being introduced to module uploads, via the use of ExtUtils::MakeMaker, Module::Build and Module::Install. .PP See CPAN::Meta for further details of the \s-1CPAN\s0 Meta Specification. .SH "FUNCTIONS" .IX Header "FUNCTIONS" .IP "\(bu" 4 meta_yaml_ok([$msg]) .Sp Basic \fI\s-1META\s0.yml\fR wrapper around \f(CW\*(C`meta_spec_ok\*(C'\fR. .IP "\(bu" 4 meta_spec_ok($file, \f(CW$version\fR [,$msg]) .Sp Validates the named file against the given specification version. Both \f(CW$file\fR and \f(CW$version\fR can be undefined. .SH "TESTING META FILES" .IX Header "TESTING META FILES" There are currently three distributions to test \s-1META\s0 files: .IP "Test-CPAN-Meta" 4 .IX Item "Test-CPAN-Meta" .PD 0 .IP "Test-CPAN-Meta-JSON" 4 .IX Item "Test-CPAN-Meta-JSON" .IP "Test-CPAN-Meta-YAML" 4 .IX Item "Test-CPAN-Meta-YAML" .PD .PP All three have slightly different requirements and are intended to be used in slightly different environments. .PP Test-CPAN-Meta-YAML requires a \s-1YAML\s0 parser, and currently looks for the \s-1YAML\s0 or YAML::Syck modules. This is the original variant of the three and was intended to provide a more complete \s-1YAML\s0 validation of a \fI\s-1META\s0.yml\fR. .PP Test-CPAN-Meta requires the Parse::CPAN::Meta module, which is now part of Perl Core as of perl\-5.10.1. This version is intended to be used by those only wishing to rely on core modules to test their \fI\s-1META\s0.yml\fR files. .PP Test-CPAN-Meta-JSON is the most recent addition to the family, and is specifically aimed at those distributions that use a \fI\s-1META\s0.json\fR Meta file. The distribution requires the \s-1JSON\s0 module to parse the Meta file. .SH "BUGS, PATCHES & FIXES" .IX Header "BUGS, PATCHES & FIXES" There are no known bugs at the time of this release. However, if you spot a bug or are experiencing difficulties that are not explained within the \s-1POD\s0 documentation, please send an email to barbie@cpan.org or submit a bug to the \&\s-1RT\s0 system (http://rt.cpan.org/Public/Dist/Display.html?Name=Test\-CPAN\-Meta\-YAML). However, it would help greatly if you are able to pinpoint problems or even supply a patch. .PP Fixes are dependent upon their severity and my availability. Should a fix not be forthcoming, please feel free to (politely) remind me. .SH "SEE ALSO" .IX Header "SEE ALSO" .IP "Test::YAML::Valid" 4 .IX Item "Test::YAML::Valid" .PD 0 .IP "Test::CPAN::Meta" 4 .IX Item "Test::CPAN::Meta" .IP "Test::CPAN::Meta::JSON" 4 .IX Item "Test::CPAN::Meta::JSON" .IP "Test::CPAN::Meta::YAML" 4 .IX Item "Test::CPAN::Meta::YAML" .PD .SH "AUTHOR" .IX Header "AUTHOR" Barbie, for Miss Barbell Productions, .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" .Vb 1 \& Copyright (C) 2007\-2015 Barbie for Miss Barbell Productions \& \& This distribution is free software; you can redistribute it and/or \& modify it under the Artistic Licence v2. .Ve