1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
|
=for :stopwords Ingy READMEs WTF licensure
=head1 NAME
CPAN::Meta::History::Meta_1_1 - Version 1.1 metadata specification for META.yml
=head1 PREFACE
This is a historical copy of the version 1.1 specification for F<META.yml>
files, copyright by Ken Williams and licensed under the same terms as Perl
itself.
Modifications from the original:
=over
=item *
Conversion from the original HTML to POD format
=item *
Include list of valid licenses from L<Module::Build> 0.18 rather than
linking to the module.
=back
=head1 DESCRIPTION
This document describes version 1.1 of the F<META.yml> specification.
The F<META.yml> file describes important properties of contributed Perl
distributions such as the ones found on L<CPAN|http://www.cpan.org>. It is
typically created by tools like L<Module::Build> and L<ExtUtils::MakeMaker>.
The fields in the F<META.yml> file are meant to be helpful to people
maintaining module collections (like CPAN), for people writing
installation tools (like L<CPAN> or L<CPANPLUS>), or just people who want to
know some stuff about a distribution before downloading it and starting to
install it.
=head1 Format
F<META.yml> files are written in the L<YAML|http://www.yaml.org/> format. The
reasons we chose YAML instead of, say, XML or Data::Dumper are discussed in
L<this thread|http://archive.develooper.com/makemaker@perl.org/msg00405.html>
on the MakeMaker mailing list.
The first line of a F<META.yml> file should be a valid L<YAML document header|http://www.yaml.org/spec/#.Document>
like C<"--- #YAML:1.0">
=head1 Fields
The rest of the META.yml file is one big YAML
L<mapping|http://www.yaml.org/spec/#.-syntax-mapping-Mapping->,
whose keys are described here.
=over 4
=item name
Example: C<Module-Build>
The name of the distribution. Often created by taking the "main
module" in the distribution and changing "::" to "-". Sometimes it's
completely different, however, as in the case of the
L<libwww-perl|http://search.cpan.org/author/GAAS/libwww-perl/> distribution.
=item version
Example: C<0.16>
The version of the distribution to which the META.yml file refers.
This is a mandatory field.
The version is essentially an arbitrary string, but I<must> be
only ASCII characters, and I<strongly should> be of the format
integer-dot-digit-digit, i.e. C<25.57>, optionally followed by
underscore-digit-digit, i.e. C<25.57_04>.
The standard tools that deal with module distribution (PAUSE, CPAN,
etc.) form an identifier for each distribution by joining the 'name'
and 'version' attributes with a dash (C<->) character. Tools
who are prepared to deal with distributions that have no version
numbers generally omit the dash as well.
=item license
Example: C<perl>
a descriptive term for the licenses ... not authoritative, but must
be consistent with licensure statements in the READMEs, documentation, etc.
The license under which this distribution may be used and
redistributed.
Must be one of the following licenses:
=over 4
=item perl
The distribution may be copied and redistributed under the same terms as perl
itself (this is by far the most common licensing option for modules on CPAN).
This is a dual license, in which the user may choose between either the GPL or
the Artistic license.
=item gpl
The distribution is distributed under the terms of the Gnu General Public
License (L<http://www.opensource.org/licenses/gpl-license.php>).
=item lgpl
The distribution is distributed under the terms of the Gnu Lesser General
Public License (L<http://www.opensource.org/licenses/lgpl-license.php>).
=item artistic
The distribution is licensed under the Artistic License, as specified by the
Artistic file in the standard perl distribution.
=item bsd
The distribution is licensed under the BSD License
(L<http://www.opensource.org/licenses/bsd-license.php>).
=item open_source
The distribution is licensed under some other Open Source Initiative-approved
license listed at L<http://www.opensource.org/licenses/>.
=item unrestricted
The distribution is licensed under a license that is B<not> approved by
L<www.opensource.org|http://www.opensource.org> but that allows distribution
without restrictions.
=item restrictive
The distribution may not be redistributed without special permission from the
author and/or copyright holder.
=back
=item license_uri
This should contain a URI where the exact terms of the license may be found.
(change "unrestricted" to "redistributable"?)
=item distribution_type
Example: C<module>
What kind of stuff is contained in this distribution. Most things on
CPAN are C<module>s (which can also mean a collection of
modules), but some things are C<script>s.
This field is basically meaningless, and tools (like Module::Build or
MakeMaker) will likely stop generating it in the future.
=item private
WTF is going on here?
index_ignore: any application that indexes the contents of
distributions (PAUSE, search.cpan.org) ought to ignore the items
(packages, files, directories, namespace hierarchies).
=item requires
Example:
Data::Dumper: 0
File::Find: 1.03
A YAML L<mapping|http://www.yaml.org/spec/#.-syntax-mapping-Mapping->
indicating the Perl modules this distribution requires for proper
operation. The keys are the module names, and the values are version
specifications as described in the L<Module::Build|documentation for Module::Build's "requires" parameter>.
I<Note: the exact nature of the fancy specifications like
C<< ">= 1.2, != 1.5, < 2.0" >> is subject to
change. Advance notice will be given here. The simple specifications
like C<"1.2"> will not change in format.>
=item recommends
Example:
Data::Dumper: 0
File::Find: 1.03
A YAML L<mapping|http://www.yaml.org/spec/#.-syntax-mapping-Mapping->
indicating the Perl modules this distribution recommends for enhanced
operation.
=item build_requires
Example:
Data::Dumper: 0
File::Find: 1.03
A YAML L<mapping|http://www.yaml.org/spec/#.-syntax-mapping-Mapping->
indicating the Perl modules required for building and/or testing of
this distribution. These dependencies are not required after the
module is installed.
=item conflicts
Example:
Data::Dumper: 0
File::Find: 1.03
A YAML L<mapping|http://www.yaml.org/spec/#.-syntax-mapping-Mapping->
indicating the Perl modules that cannot be installed while this
distribution is installed. This is a pretty uncommon situation.
- possibly separate out test-time prereqs, complications include: can
tests be meaningfully preserved for later running? are test-time
prereqs in addition to build-time, or exclusive?
- make official location for installed *distributions*, which can
contain tests, etc.
=item dynamic_config
Example: C<0>
A boolean flag indicating whether a F<Build.PL> or
F<Makefile.PL> (or similar) must be executed, or whether this
module can be built, tested and installed solely from consulting its
metadata file. The main reason to set this to a true value if that
your module performs some dynamic configuration (asking questions,
sensing the environment, etc.) as part of its build/install process.
Currently L<Module::Build> doesn't actually do anything with
this flag - it's probably going to be up to higher-level tools like
L<CPAN|CPAN.pm> to do something useful with it. It can potentially
bring lots of security, packaging, and convenience improvements.
=item generated_by
Example: C<Module::Build version 0.16>
Indicates the tool that was used to create this F<META.yml> file. It's
good form to include both the name of the tool and its version, but
this field is essentially opaque, at least for the moment.
=back
=head2 Ingy's suggestions
=over 4
=item short_description
add as field, containing abstract, maximum 80 characters, suggested minimum 40 characters
=item description
long version of abstract, should add?
=item maturity
alpha, beta, gamma, mature, stable
=item author_id, owner_id
=item categorization, keyword, chapter_id
=item URL for further information
could default to search.cpan.org on PAUSE
=item namespaces
can be specified for single elements by prepending
dotted-form, i.e. "com.example.my_application.my_property". Default
namespace for META.yml is probably "org.cpan.meta_author" or
something. Precedent for this is Apple's Carbon namespaces, I think.
=back
=head1 History
=over 4
=item *
B<March 14, 2003> (Pi day) - created version 1.0 of this document.
=item *
B<May 8, 2003> - added the "dynamic_config" field, which was missing from the
initial version.
=back
|