CPAN::Meta::Check(3)
β¨ CPAN::Meta::Check(3) β User Contributed Perl Documentation β¨
Okay bestie, so this is CPAN::Meta::Check, and it's genuinely one of those small-but-iconic modules that just does its job. It lives in the User Contributed Perl Documentation section, which is honestly giving "community-made, main character energy" π
πΈ NAME πΈ
CPAN::Meta::Check β literally just verify requirements in a CPAN::Meta object. That's it. That's the whole vibe. π
π¦ VERSION π¦
version 0.018 β yes, zero-point-zero-one-eight, she's a little vintage but she slays.
β¨ SYNOPSIS β¨
Like, here's the entire thing you need to get going:
warn "$_\n" for verify_dependencies($meta, [qw/runtime build test/], 'requires');
One line. Boom. Requirements verified. Periodt. π₯
π DESCRIPTION π
So this module verifies if requirements described in a CPAN::Meta object are present. That's the whole gig, no cap β it looks at what a CPAN::Meta object says it needs, and then checks whether those things are actually, you know, there. π«Ά
π§ FUNCTIONS π§
β check_requirements($reqs, $type, $incdirs) β
This function checks if all dependencies in $reqs (and $reqs here is a CPAN::Meta::Requirements object, iykyk) are met. And here's the lil plot twist: it takes into account that 'conflicts' dependencies have to be checked in reverse β so don't come for her about the backwards logic, it's intentional. π
It returns a hash with the modules as keys and any problems as values. The value for a successfully found module will be undef (so like, if you get undef, that's a good thing, don't panic π₯°). Modules are searched for in @$incdirs, defaulting to @INC.
β verify_dependencies($meta, $phases, $types, $incdirs) β
Check all requirements in $meta for phases $phases and type $type. Yep, the parameter says $types in the signature but the description says $type β that's not me being sloppy, that's just how it's written, and I'm relaying it faithfully. π Anyway: modules are searched for in @$incdirs, defaulting to @INC. And $meta should be a CPAN::Meta::Prereqs or CPAN::Meta object β either works, she's flexible like that. π
β requirements_for($meta, $phases, $types) β
π¨ Heads up bestie: this function is deprecated and may be removed at some point in the future. Please use CPAN::Meta::Prereqs->merged_requirements instead. Like, don't build your whole personality around it, okay? π
This function returns a unified CPAN::Meta::Requirements object for all $type requirements for $phases.
$phasesmay be either one (scalar) value or an arrayref of valid values as defined by theCPAN::Metaspec.$typemust be a relationship as defined by the same spec.$metashould be aCPAN::Meta::PrereqsorCPAN::Metaobject.
So basically she scoops everything up into one neat lil requirements object and hands it to you like a lil gift. π
π SEE ALSO π
Test::CheckDepsβ the testing bestie π§ͺCPAN::Metaβ the data model, the blueprint, the source material π
π AUTHOR π
Leon Timmermans <leont@cpan.org> β legend behaviour, honestly. π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2012 by Leon Timmermans.
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 like, yes, go off, remix it, redistribute it β just keep it under those same Perl 5 terms. π«Ά
And that's the whole page, bestie! π This was CPAN::Meta::Check version 0.018, coming at you from the perl v5.42.0 docs dated 2024-03-08 β mwah, drink water, and may all your dependencies resolve on the first try πβ¨π
π¦ where this page comes from
- opensuse-leap 16.0: perl-CPAN-Meta-Check 0.18.0-160000.2.2 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms