1Parse::CPAN::Meta(3pm) Perl Programmers Reference Guide Parse::CPAN::Meta(3pm)
2
3
4

NAME

6       Parse::CPAN::Meta - Parse META.yml and other similar CPAN metadata
7       files
8

SYNOPSIS

10           #############################################
11           # In your file
12
13           ---
14           rootproperty: blah
15           section:
16             one: two
17             three: four
18             Foo: Bar
19             empty: ~
20
21
22
23           #############################################
24           # In your program
25
26           use Parse::CPAN::Meta;
27
28           # Create a YAML file
29           my @yaml = Parse::CPAN::Meta::LoadFile( 'Meta.yml' );
30
31           # Reading properties
32           my $root = $yaml[0]->{rootproperty};
33           my $one  = $yaml[0]->{section}->{one};
34           my $Foo  = $yaml[0]->{section}->{Foo};
35

DESCRIPTION

37       Parse::CPAN::Meta is a parser for META.yml files, based on the parser
38       half of YAML::Tiny.
39
40       It supports a basic subset of the full YAML specification, enough to
41       implement parsing of typical META.yml files, and other similarly simple
42       YAML files.
43
44       If you need something with more power, move up to a full YAML parser
45       such as YAML, YAML::Syck or YAML::LibYAML.
46
47       Parse::CPAN::Meta provides a very simply API of only two functions,
48       based on the YAML functions of the same name. Wherever possible,
49       identical calling semantics are used.
50
51       All error reporting is done with exceptions (die'ing).
52

FUNCTIONS

54       For maintenance clarity, no functions are exported.
55
56   Load
57         my @yaml = Load( $string );
58
59       Parses a string containing a valid YAML stream into a list of Perl data
60       structures.
61
62   LoadFile
63         my @yaml = LoadFile( 'META.yml' );
64
65       Reads the YAML stream from a file instead of a string.
66

SUPPORT

68       Bugs should be reported via the CPAN bug tracker at
69
70       <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Parse-CPAN-Meta>
71

AUTHOR

73       Adam Kennedy <adamk@cpan.org>
74

SEE ALSO

76       YAML, YAML::Syck, Config::Tiny, CSS::Tiny,
77       <http://use.perl.org/~Alias/journal/29427>, <http://ali.as/>
78
80       Copyright 2006 - 2009 Adam Kennedy.
81
82       This program is free software; you can redistribute it and/or modify it
83       under the same terms as Perl itself.
84
85       The full text of the license can be found in the LICENSE file included
86       with this module.
87
88
89
90perl v5.10.1                      2017-03-22            Parse::CPAN::Meta(3pm)
Impressum