Test::...::YAML(3pm)
π Test::...::YAML β the manual, but make it make sense π
okay so bestie, you're reading the Test::...::YAML(3pm) page, aka the perl manpage for the module formally known as Test::CPAN::Meta::YAML. yes the manpage title is abbreviated with dots because perl manpage titles love to be dramatic like that. anyway, buckle up, we're validating META.yml files and it's gonna be adorable.
β¨ NAME β¨
Test::CPAN::Meta::YAML β validate a META.yml file within a CPAN distribution. that's it. that's the whole job. she's a validator and she's thriving. π
πΈ SYNOPSIS πΈ
okay so there are two forms this module can be used in, and honestly both are valid, pick your fighter. π
Form one: the standalone test of your distribution's META.yml file. just vibes, no counting:
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();
note that you may provide an optional label/comment/message/etc to the function, or one will be created automatically. so either you hand her a little name tag or she makes her own. self-sufficient queen. π
Form two: this one lets you test other META.yml files, or specify a specific version you wish to test against. look at her being flexible:
use Test::More tests => 6;
use Test::CPAN::Meta::YAML;
# specify a file and specification version
meta_spec_ok('META.yml','1.3',$msg);
# specify the specification version to validate the local META.yml
meta_spec_ok(undef,'1.3',$msg);
# specify a file, where the specification version is deduced
# from the file itself
meta_spec_ok('META.yml',undef,$msg);
heads up bestie: this form requires you to specify the number of tests you will be running in your test script. also note that each meta_spec_ok is actually two tests under the hood. sneaky. she's giving βοΈ for the price of βοΈ. no cap.
π¦ DESCRIPTION π¦
this module was written to ensure that a META.yml file β the one provided with a standard distribution uploaded to CPAN β meets the specifications that are slowly being introduced to module uploads, via the use of ExtUtils::MakeMaker, Module::Build and Module::Install. like, the spec is evolving, she's keeping up, it's a whole thing. π
see CPAN::Meta for further details of the CPAN Meta Specification. iykyk. π
π FUNCTIONS π
here's the actual tea, the functions themselves:
meta_yaml_ok([$msg])β basicMETA.ymlwrapper aroundmeta_spec_ok. she's the cute little interface,meta_spec_okis doing the heavy lifting behind the curtain. πmeta_spec_ok($file, $version [,$msg])β validates the named file against the given specification version. both$fileand$versioncan be undefined. yes, genuinely, both. undefined is a valid vibe here. β¨
π§ TESTING META FILES π§
so there are currently three distributions to test META files, and they're a little family:
Test-CPAN-MetaTest-CPAN-Meta-JSONTest-CPAN-Meta-YAML
all three have slightly different requirements and are intended to be used in slightly different environments. sisters, not twins. π
Test-CPAN-Meta-YAML requires a YAML parser, and currently looks for the YAML or YAML::Syck modules. this is the original variant of the three and was intended to provide a more complete YAML validation of a META.yml. she was here first, respect the elder. π
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 META.yml files. minimal dependency energy. π
Test-CPAN-Meta-JSON is the most recent addition to the family, and is specifically aimed at those distributions that use a META.json Meta file. the distribution requires the JSON module to parse the Meta file. baby of the family, doing her own thing. πΈ
π BUGS, PATCHES & FIXES π
there are no known bugs at the time of this release. iconic. but listen β if you spot a bug or are experiencing difficulties that are not explained within the POD documentation, please send an email to barbie@cpan.org or submit a bug to the RT 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. like, genuinely, that would be so helpful bestie, thank you in advance. π«Ά
fixes are dependent upon their severity and my availability. should a fix not be forthcoming, please feel free to (politely) remind me. politely β she said it, i'm just relaying it. π
π SEE ALSO π
go read these too, they're all part of the lore:
Test::YAML::ValidTest::CPAN::MetaTest::CPAN::Meta::JSONTest::CPAN::Meta::YAML
π AUTHOR π
Barbie, <barbie@cpan.org> for Miss Barbell Productions, <http://www.missbarbell.co.uk>. main character energy fr fr. β¨
π COPYRIGHT AND LICENSE π
Copyright (C) 2007-2015 Barbie for Miss Barbell Productions
This distribution is free software; you can redistribute it and/or
modify it under the terms of the Artistic Licence v2.
and that's the whole page bestie!! π¦ this beauty is perl v5.34.0, dated 2022-06-17, and it's filed under Test::...::YAML(3pm) β go validate something and slay. periodt. π
ππ
π¦ where this page comes from
- debian bookworm: libtest-cpan-meta-yaml-perl 0.25-2 Β· Artistic-2.0
- debian trixie: libtest-cpan-meta-yaml-perl 0.25-2 Β· Artistic-2.0
- ubuntu noble: libtest-cpan-meta-yaml-perl 0.25-2 Β· Artistic-2.0
- ubuntu resolute: libtest-cpan-meta-yaml-perl 0.25-2 Β· Artistic-2.0
- ubuntu stonking: libtest-cpan-meta-yaml-perl 0.25-2 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms