- CLASS CONSTRUCTOR
- BUGS, PATCHES & FIXES
- COPYRIGHT AND LICENSE
Test::CPAN::Meta::Version - Validation of META.yml specification elements.
This module was written to ensure that a META.yml file, 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.
This module is meant to be used together with Test::CPAN::Meta, however the code is self contained enough that you can access it directly.
Validation of META.yml specification elements.
new( yaml => $yaml [, spec => $version] )
The constructor must be passed a valid YAML data structure.
Optionally you may also provide a specification version. This version is then use to ensure that the given YAML data structure meets the respective specification definition. If no version is provided the module will attempt to deduce the appropriate specification version from the data structure itself.
Using the YAML data structure provided with the constructure, attempts to parse and validate according to the appropriate specification definition.
Returns 1 if any errors found, otherwise returns 0.
Returns a list of the errors found during parsing.
Checks whether a map (or hash) part of the YAML data structure conforms to the appropriate specification definition.
Checks whether a list (or array) part of the YAML data structure conforms to the appropriate specification definition.
Validates that the YAML header is valid.
Note: No longer used as we now read the YAML data structure, not the file.
Validates that a given value is in an acceptable URL format
Validates that the URL to a META.yml specification is a known one.
Validates that the value is either a string or an undef value. Bit of a catchall function for parts of the data structure that are completely user defined.
Validates that a string exists for the given key.
Validate that a file is passed for the given key. This may be made more thorough in the future. For now it acts like \&string.
Validates a list of versions, e.g. '<= 5, >=2, ==3, !=4, >1, <6, 0'.
Validates a single version string. Versions of the type '5.8.8' and '0.00_00' are both valid.
Validates for a boolean value. Currently these values are '1', '0', 'true', 'false', however the latter 2 may be removed.
Validates that a value is given for the license. Returns 1 if an known license type, or 2 if a value is given but the license type is not a recommended one.
Validates that the given key is in CamelCase, to indicate a user defined keyword.
Validates that key is in an acceptable format for the META.yml specification, i.e. any in the character class [-_a-z].
Validates that a given key is in an acceptable module name format, e.g. 'Test::CPAN::Meta::Version'.
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 POD documentation, please send an email to firstname.lastname@example.org or submit a bug to the RT system (http://rt.cpan.org/Public/Dist/Display.html?Name=Test-YAML-Meta). However, it would help greatly if you are able to pinpoint problems or even supply a patch.
Fixes are dependant upon their severity and my availablity. Should a fix not be forthcoming, please feel free to (politely) remind me.
b - Beta testing d - Developer p - Perl-only O - Object oriented p - Standard-Perl: user may choose between GPL and Artistic
Barbie, <email@example.com> for Miss Barbell Productions, http://www.missbarbell.co.uk
Copyright (C) 2007 Barbie for Miss Barbell Productions This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.