Test::...::YAML(3pm)

πŸ“¦
version 0.25 Β· 5 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– 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]) β€” basic META.yml wrapper around meta_spec_ok. she's the cute little interface, meta_spec_ok is doing the heavy lifting behind the curtain. πŸŽ€
  • meta_spec_ok($file, $version [,$msg]) β€” validates the named file against the given specification version. both $file and $version can 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-Meta
  • Test-CPAN-Meta-JSON
  • Test-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::Valid
  • Test::CPAN::Meta
  • Test::CPAN::Meta::JSON
  • Test::CPAN::Meta::YAML

πŸŽ€ AUTHOR πŸŽ€

Barbie, <barbie@cpan.org> for Miss Barbell Productions, <http://www.missbarbell.co.uk>. main character energy fr fr. ✨


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. πŸ’…πŸŒˆπŸ’œ