CPAN::META::VALIDATOR(3perl)

✨ CPAN::Meta::Validator πŸ’– (that's the 3perl manual, bestie)

okay so real talk, this page lives in the Perl Programmers Reference Guide and it's about checking whether your CPAN dist metadata is actually valid, and honestly? iconic. πŸŽ€


🌸 NAME

CPAN::Meta::Validator β€” bestie, its whole job is validating CPAN distribution metadata structures. that's it. that's the gig. πŸ’…


πŸ¦‹ VERSION

version 2.150013 ✨


🌈 SYNOPSIS

okay so here's the whole vibe in code, no notes:

my $struct = decode_json_file('META.json');

my $cmv = CPAN::Meta::Validator->new( $struct );

unless ( $cmv->is_valid ) {
  my $msg = "Invalid META structure.  Errors found:\n";
  $msg .= join( "\n", $cmv->errors );
  die $msg;
}

like. decode the META.json, hand it to the validator, and if it's not valid you die with all the errors joined up. slay. πŸ˜­πŸ’–


πŸ’œ DESCRIPTION

so this module validates a CPAN Meta structure β€” and the way it does that is lowkey the smart part: it checks your structure against the version of the specification that the structure itself claims in its meta-spec field. it's giving "read the room, then judge accordingly" and we're obsessed. πŸ‘‘


🌟 METHODS

πŸŽ€ new

my $cmv = CPAN::Meta::Validator->new( $struct )

the constructor. you must pass it a metadata structure β€” it literally cannot start without one, periodt. ✨

πŸ’– is_valid

if ( $cmv->is_valid ) {
  ...
}

returns a boolean value that tells you whether the metadata you handed over is valid. true = valid, false = not valid, iykyk. 🫢

πŸ¦‹ errors

warn( join "\n", $cmv->errors );

returns a list of errors that turned up during validation. every single one. so you can print them, warn them, join them, whatever your heart desires. πŸ’…


😭 BUGS

bestie, if you find a bug or you're craving a feature, please report it using the CPAN Request Tracker. bugs can be submitted through the web interface right here:

<http://rt.cpan.org/Dist/Display.html?Queue=CPAN-Meta>

and when you do submit a bug or a request, please include a test-file β€” or a patch to an existing test-file β€” that shows off the bug or the feature you want. that's the whole ask. don't make them guess, that's not the vibe. πŸ™ˆ


πŸ‘‘ AUTHORS

  • David Golden <dagolden@cpan.org>
  • Ricardo Signes <cpan@semiotic.systems>
  • Adam Kennedy <adamk@cpan.org>

three absolute legends fr fr. πŸ§šπŸ’œ


this software is copyright (c) 2010 by David Golden, Ricardo Signes, Adam Kennedy and Contributors.

this is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. so go off, responsibly. 🌸


and that's the page, babe πŸŽ€ β€” this was CPAN::Meta::Validator(3perl) from perl v5.44.0, dated 2026-10-17. go validate something and feel gorgeous doing it. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from
  • arch rolling: perl 5.44.0-1 Β· Artistic-1.0-Perl AND GPL-1.0-or-later
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms