CPAN::META::HISTORY::META_1_2(3pm)
π NAME π
CPAN::Meta::History::Meta_1_2(3pm) β Version 1.2 metadata specification for META.yml π
πΈ PREFACE πΈ
Okay so this is a historical copy of the version 1.2 spec for META.yml files, copyright by Ken Williams and licensed under the same terms as Perl itself β¨
Modifications from the original:
- Various spelling corrections π©Ή
- Include list of valid licenses from
Module::Build 0.2611rather than linking to the module, with minor updates to text and links to reflect versions at the time of publication π - Fixed some dead links to point to active resources π
π¦ SYNOPSIS π¦
--- #YAML:1.0
name: Module-Build
abstract: Build and install Perl modules
version: 0.20
author:
- Ken Williams <kwilliams@cpan.org>
license: perl
distribution_type: module
requires:
Config: 0
Cwd: 0
Data::Dumper: 0
ExtUtils::Install: 0
File::Basename: 0
File::Compare: 0
File::Copy: 0
File::Find: 0
File::Path: 0
File::Spec: 0
IO::File: 0
perl: 5.005_03
recommends:
Archive::Tar: 1.00
ExtUtils::Install: 0.3
ExtUtils::ParseXS: 2.02
Pod::Text: 0
YAML: 0.35
build_requires:
Test: 0
urls:
license: http://dev.perl.org/licenses/
meta-spec:
version: 1.2
url: http://module-build.sourceforge.net/META-spec-v1.2.html
generated_by: Module::Build version 0.20
π DESCRIPTION π
This doc describes version 1.2 of the META.yml specification π«Ά
The META.yml file describes important properties of contributed Perl distributions β like the ones found on CPAN. Itβs typically created by tools like Module::Build, Module::Install, and ExtUtils::MakeMaker β¨
The fields in the META.yml file are meant to be helpful for people maintaining module collections (like CPAN), for people writing installation tools (like CPAN.pm or CPANPLUS), or just for people who want to know some stuff about a distribution before downloading it and starting to install it π
Note: The latest stable version of this specification can always be found athttp://module-build.sourceforge.net/META-spec-current.html, and the latest development version β which may include things that won't make it into the stable version β can always be found athttp://module-build.sourceforge.net/META-spec-blead.htmlβ
π FORMAT π
META.yml files are written in the YAML format (see http://www.yaml.org/) π§
See the following links to learn why we chose YAML instead of, say, XML or Data::Dumper:
- Module::Build design plans β
http://www.nntp.perl.org/group/perl.makemaker/2002/04/msg407.htmlπ₯ - Not keen on YAML β
http://www.nntp.perl.org/group/perl.module-authors/2003/11/msg1353.htmlπ - META Concerns β
http://www.nntp.perl.org/group/perl.module-authors/2003/11/msg1385.htmlπ
π TERMINOLOGY π
- distribution β This is the primary object described by the
META.ymlspecification. In the context of this document it usually refers to a collection of modules, scripts, and/or documents that are distributed for other developers to use π - module β This refers to a reusable library of code typically contained in a single file. Currently, we primarily talk of perl modules, but this specification should be open enough to apply to other languages as well (ex. python, ruby) ππ
β VERSION SPECIFICATIONS β
Some fields require a version specification (ex. requires, recommends, build_requires, etc.). This section details the version specifications that are currently supported π
If a single version is listed, then that version is considered to be the minimum version supported β
If 0 is given as the version number, then any version is supported π
Additionally, for more complicated requirements, the specification supports a list of versions, each of which may be optionally preceded by a relational operator π¦
Supported operators include < (less than), <= (less than or equal), > (greater than), >= (greater than or equal), == (equal), and != (not equal) π₯
If a list is given then it is evaluated from left to right so that any specifications in the list that conflict with a previous specification are overridden by the later π
Examples:
>= 1.2, != 1.5, < 2.0
Any version from version 1.2 onward, except version 1.5, that also precedes version 2.0 πΈ
π HEADER π
The first line of a META.yml file should be a valid YAML document header like --- #YAML:1.0 β¨
β¨ FIELDS β¨
okay so the rest of the META.yml file is literally just one big YAML mapping, and its keys are all described right here. buckle up bestie, there's a lot π
πΈ meta-spec
Example:
meta-spec:
version: 1.2
url: http://module-build.sourceforge.net/META-spec-v1.2.html
(Spec 1.1) [required] {URL} This field tells you where the version of the META.yml specification that's being used actually lives. iconic.
πΈ name
Example:
name: Module-Build
(Spec 1.0) [required] {string} The name of the distribution β which is often created by taking the "main module" in the distribution and swapping :: for -. BUT. Sometimes it's completely different, no cap, like with the libwww-perl distribution (see http://search.cpan.org/author/GAAS/libwww-perl/).
πΈ version
Example:
version: 0.20
(Spec 1.0) [required] {version} The version of the distribution that this META.yml file is referring to.
πΈ abstract
Example:
abstract: Build and install Perl modules.
(Spec 1.1) [required] {string} A short lil description of what this distribution is even for.
πΈ author
Example:
author:
- Ken Williams <kwilliams@cpan.org>
(Spec 1.1) [required] {list of strings} A YAML sequence listing the author(s) of the distribution. The preferred form is author-name <email-address>. periodt.
πΈ license
Example:
license: perl
(Spec 1.0) [required] {string} The license under which this distribution may be used and redistributed.
It MUST be one of the following licenses:
π 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). It's a dual license, meaning the user gets to pick between the GPL version 1 or the Artistic version 1 license. slay.
π gpl
The distribution is distributed under the terms of the GNU General Public License version 2 (http://opensource.org/licenses/GPL-2.0).
π lgpl
The distribution is distributed under the terms of the GNU Lesser General Public License version 2 (http://opensource.org/licenses/LGPL-2.1).
π artistic
The distribution is licensed under the Artistic License version 1, as specified by the Artistic file in the standard perl distribution (http://opensource.org/licenses/Artistic-Perl-1.0).
π bsd
The distribution is licensed under the BSD 3-Clause License (http://opensource.org/licenses/BSD-3-Clause).
π open_source
The distribution is licensed under some other Open Source Initiative-approved license listed over at http://www.opensource.org/licenses/.
π unrestricted
The distribution is licensed under a license that is not approved by www.opensource.org http://www.opensource.org/ but that still allows distribution without restrictions. ok flexible queen.
π restrictive
The distribution may NOT be redistributed without special permission from the author and/or copyright holder. π¨
πΈ distribution_type
Example:
distribution_type: module
(Spec 1.0) [optional] {string} What kind of stuff is actually inside this distribution. Most things on CPAN are modules (which can also mean a whole collection of modules), but some things are scripts.
ngl this field is basically meaningless π β because so many distributions are hybrids of several kinds of things, or some brand-new thing, or just subjectively different in focus depending on who's using them. Tools like Module::Build and MakeMaker will likely stop generating this field. so yeah, it's giving deprecated-adjacent.
πΈ requires
Example:
requires:
Data::Dumper: 0
File::Find: 1.03
(Spec 1.0) [optional] {map} A YAML mapping listing the Perl modules this distribution needs in order to work properly. The keys are the module names, and the values are version specifications as described in Module::Build for the requires parameter.
πΈ recommends
Example:
recommends:
Data::Dumper: 0
File::Find: 1.03
(Spec 1.0) [optional] {map} A YAML mapping listing the Perl modules this distribution recommends for enhanced operation. the nice-to-haves, the little luxuries π
ALTERNATIVE: Sometimes it's better to show the user which features depend on which modules, so they can make an informed decision about which recommended modules to install.
Example:
optional_features:
- foo:
description: Provides the ability to blah.
requires:
Data::Dumper: 0
File::Find: 1.03
- bar:
description: This feature is not available on this platform.
excludes_os: MSWin32
(Spec 1.1) [optional] {map} A YAML sequence of names for optional features that become available when their requirements are met. For each feature there's a description, plus any of requires, build_requires, conflicts, requires_packages, requires_os, and excludes_os β all of which mean the same thing in this subcontext as they do everywhere else in this document.
πΈ build_requires
Example:
build_requires:
Data::Dumper: 0
File::Find: 1.03
(Spec 1.0) [optional] {map} A YAML mapping listing the Perl modules required for building and/or testing this distribution. These dependencies are not needed once the module is installed. bye bye build deps π¦
πΈ conflicts
Example:
conflicts:
Data::Dumper: 0
File::Find: 1.03
(Spec 1.0) [optional] {map} A YAML mapping listing the Perl modules that cannot be installed while this distribution is installed. fr fr this is a pretty uncommon situation.
πΈ dynamic_config
Example:
dynamic_config: 0
(Spec 1.0) [optional] {boolean} A boolean flag saying whether a Build.PL or Makefile.PL (or similar) must be executed when building this distribution, or whether it can be built, tested and installed purely from consulting its metadata file. The main reason to set this to a true value is that your module does some dynamic configuration (asking questions, sensing the environment, etc.) as part of its build/install process.
Currently Module::Build doesn't actually do anything with this flag β it's probably going to be up to higher-level tools like CPAN to do something useful with it. It can potentially bring lots of security, packaging, and convenience improvements. π
If this field is omitted, it defaults to 1 (true). don't forget bestie!!
πΈ private
(Deprecated) (Spec 1.0) [optional] {map} This field has been renamed to no_index. See below. β¬οΈ
πΈ provides
Example:
provides:
Foo::Bar:
file: lib/Foo/Bar.pm
version: 0.27_02
Foo::Bar::Blah:
file: lib/Foo/Bar/Blah.pm
Foo::Bar::Baz:
file: lib/Foo/Bar/Baz.pm
version: 0.3
(Spec 1.1) [optional] {map} A YAML mapping that describes all the packages provided by this distribution. This info can be (and, in some cases, is) used by distribution and automation mechanisms like PAUSE, CPAN, and search.cpan.org to build indexes saying which distribution you can find various packages in.
When you use tools like Module::Build that can generate the provides mapping for your distribution automatically, make sure you actually look at what it generates and check it makes sense β indexers will usually trust the provides field if it's there, rather than scanning through the distribution files themselves to figure out packages and versions. And that's a good thing, because it means you can use provides to tell the indexers precisely what you want indexed about your distribution, instead of relying on them to essentially guess what you want indexed. main character energy tbh.
πΈ no_index
Example:
no_index:
file:
- My/Module.pm
dir:
- My/Private
package:
- My::Module::Stuff
namespace:
- My::Module::Stuff
(Spec 1.1) [optional] {map} A YAML mapping that describes any files, directories, packages, and namespaces that are private (i.e. implementation artifacts) and therefore not of interest to searching and indexing tools. This is useful when there's no provides field present.
(Note: I'm not actually sure who looks at this field, or exactly what they do with it. This spec could be off in some way from actual usage.) π honest king
π file
(Spec 1.1) [optional] Exclude any listed file(s).
π dir
(Spec 1.1) [optional] Exclude anything below the listed directory(ies).
π package
(Spec 1.1) [optional] Exclude the listed package(s).
π namespace
(Spec 1.1) [optional] Excludes anything below the listed namespace(s) β but not the listed namespace(s) itself.
πΈ keywords
Example:
keywords:
- make
- build
- install
(Spec 1.1) [optional] {list} A sequence of keywords/phrases that describe this distribution. tags for your distro π
πΈ resources
Example:
resources:
license: http://dev.perl.org/licenses/
homepage: http://sourceforge.net/projects/module-build
bugtracker: http://rt.cpan.org/NoAuth/Bugs.html?Dist=Module-Build
MailingList: http://lists.sourceforge.net/lists/listinfo/module-build-general
(Spec 1.1) [optional] {map} A mapping of any URL resources related to this distribution. All-lower-case keys β like homepage, license, and bugtracker β are reserved by this specification, since they have "official" meanings defined right here in this spec. If you want to add your own "special" entries (like the MailingList entry up there), use at least one upper-case letter. iykyk.
The current set of official keys is:
homepageβ the official home of this project on the web.licenseβ an URL for an official statement of this distribution's license.bugtrackerβ an URL for a bug tracker (e.g. Bugzilla or RT queue) for this project.
πΈ generated_by
Example:
generated_by: Module::Build version 0.20
(Spec 1.0) [required] {string} Indicates the tool that was used to create this META.yml file. Good form is to include both the name of the tool and its version, but this field is essentially opaque, at least for the moment. If the META.yml was generated by hand, it's suggested that you put the author in here instead.
[Note: Mymeta_stats.plscript, which I use to gather statistics regardingMETA.ymlusage, prefers the form listed above β i.e. it splits on/\s+version\s+/, taking the first field as the name of the tool that generated the file and the second field as the version of that tool. RWS] π«Ά
π SEE ALSO π
- CPAN
http://www.cpan.org/ - CPAN.pm
- CPANPLUS
- Data::Dumper
- ExtUtils::MakeMaker
- Module::Build
- Module::Install
- XML
http://www.w3.org/XML/ - YAML
http://www.yaml.org/
πΈ HISTORY πΈ
Okay bestie, this is the lore drop π β the whole glow-up timeline of this spec, from baby's first draft to the polished icon you're reading rn. Every date, every change, no skips. Let's go π
- March 14, 2003 (Pi day) π₯§
- Created version 1.0 of this document. Yes, on Pi day. Main character energy from day one, fr fr.
- May 8, 2003
- Added the
dynamic_configfield, which was straight-up missing from the initial version. Not me forgetting a whole field π β we fixed it.
- Added the
- November 13, 2003
- Added more YAML rationale articles. Reading material, bestie π
- Fixed the existing link to the YAML discussion thread so it points to the new <http://nntp.x.perl.org/group/> site.
- Added and deprecated the
privatefield. It got like five minutes of fame, poor thing π - Added the
abstract,configure,requires_packages,requires_os,excludes_os, andno_indexfields. - Bumped version. Slay.
- November 16, 2003
- Added the
generationandauthored_byfields. - Added an alternative proposal to the
recommendsfield. - Added a proposal for a
requires_build_toolsfield.
- Added the
- December 9, 2003
- Added a link to the latest version of this specification on CPAN.
- Added the section "VERSION SPECIFICATIONS" β you know, the one from earlier π
- Changed the name from
Module::Build::META-spectoCPAN::META::Specification. Rebrand era β¨ - Added a proposal for the
auto_regeneratefield.
- December 15, 2003
- Added the
indexfield as a compliment tono_index. They're a matching set, your honor π«Ά - Added the
keywordsfield as a means to aid searching distributions. SEO era, lowkey iconic. - Added the "TERMINOLOGY" section to explain certain terms that may be ambiguous. (You already scrolled past it, no cap.)
- Added the
- July 26, 2005 π§Ή
- Removed a whole bunch of items that have never actually been supported and were more like records of brainstorming:
generation,requires_build_tools,requires_packages,configure,requires_os,excludes_os,auto_regenerate. The vault got cleaned out π - Changed
authored_bytoauthor, since that's always been what it's actually called in actualMETA.ymlfiles. We were lying to ourselves, ngl. - Added the
==operator to the list of supported version-checking operators. - Noted that the
distribution_typefield is basically meaningless and shouldn't really be used. It's giving decorative. It's giving purely ornamental. Don't use it π€ - Clarified
dynamic_configa bit. Growth. Maturity. Character development π
- Removed a whole bunch of items that have never actually been supported and were more like records of brainstorming:
- August 23, 2005
- Removed the name
CPAN::META::Specification, since that implies a module that doesn't actually exist. We were out here citing a whole phantom module ππ Not anymore, bestie.
- Removed the name
Just a lil reminder for the vibe check: the removals above are real removals β those fields were never actually supported, so don't go writing them into your META.yml and expecting magic, mkay? π§
And that's the whole history, periodt. π
This page came to you courtesy of perl v5.42.3, dated 2026-11-03 β so like, go be gorgeous with your metadata, bestie, you've got this πππ
π¦ where this page comes from
- alpine 3.24: perl-doc 5.42.3-r0 Β· Artistic-1.0-Perl 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