1CPAN::Meta::Validator(3U)ser Contributed Perl DocumentatiCoPnAN::Meta::Validator(3)
2
3
4

NAME

6       CPAN::Meta::Validator - validate CPAN distribution metadata structures
7

VERSION

9       version 2.102400
10

SYNOPSIS

12         my $struct = decode_json_file('META.json');
13
14         my $cmv = CPAN::Meta::Validator->new( $struct );
15
16         unless ( $cmv->is_valid ) {
17           my $msg = "Invalid META structure.  Errors found:\n";
18           $msg .= join( "\n", $cmv->errors );
19           die $msg;
20         }
21

DESCRIPTION

23       This module validates a CPAN Meta structure against the version of the
24       the specification claimed in the "meta-spec" field of the structure.
25

METHODS

27   new
28         my $cmv = CPAN::Meta::Validator->new( $struct )
29
30       The constructor must be passed a metadata structure.
31
32   is_valid
33         if ( $cmv->is_valid ) {
34           ...
35         }
36
37       Returns a boolean value indicating whether the metadata provided is
38       valid.
39
40   errors
41         warn( join "\n", $cmv->errors );
42
43       Returns a list of errors seen during validation.
44

BUGS

46       Please report any bugs or feature using the CPAN Request Tracker.  Bugs
47       can be submitted through the web interface at
48       http://rt.cpan.org/Dist/Display.html?Queue=CPAN-Meta
49       <http://rt.cpan.org/Dist/Display.html?Queue=CPAN-Meta>
50
51       When submitting a bug or request, please include a test-file or a patch
52       to an existing test-file that illustrates the bug or desired feature.
53

AUTHORS

55       ·   David Golden <dagolden@cpan.org>
56
57       ·   Ricardo Signes <rjbs@cpan.org>
58
60       This software is copyright (c) 2010 by David Golden and Ricardo Signes.
61
62       This is free software; you can redistribute it and/or modify it under
63       the same terms as the Perl 5 programming language system itself.
64
65
66
67perl v5.12.1                      2010-08-28          CPAN::Meta::Validator(3)
Impressum