CPAN::META::HISTORY::META_1_4(3pm)
π CPAN::Meta::History::Meta_1_4(3pm) β the Perl Programmers Reference Guide, but make it a group chat
okay so real talk β this is the historical copy of the version 1.4 spec for META.yml files, and it lives at CPAN::Meta::History::Meta_1_4(3pm) in the Perl Programmers Reference Guide. she's a legacy icon, she's archived, and we're gonna read her together. no cap. π
β¨ NAME β¨
CPAN::Meta::History::Meta_1_4 β the Version 1.4 metadata specification for META.yml, bestie. that's the whole vibe.
π¦ PREFACE π¦
So this is a historical copy of the version 1.4 specification for META.yml files, copyright by Ken Williams and licensed under the same terms as Perl itself. iconic of him honestly.
Modifications from the original:
- Various spelling corrections (we love a glow-up β¨)
- Include list of valid licenses from
Module::Build0.2807 rather 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. (the links got a little refresh, slay)
π§ 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
resources:
license: http://dev.perl.org/licenses/
meta-spec:
version: 1.4
url: http://module-build.sourceforge.net/META-spec-v1.3.html
generated_by: Module::Build version 0.20
like, that's the whole aesthetic right there π
πΈ DESCRIPTION πΈ
This document describes version 1.4 of the META.yml specification. periodt.
The META.yml file describes important properties of contributed Perl distributions such as the ones found on CPAN. It is typically created by tools like Module::Build, Module::Install, and ExtUtils::MakeMaker. (the holy trinity of "yeah I made that" π
)
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. lowkey thoughtful of them π«Ά
Note: The latest stable version of this specification can always be found at <http://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 at <http://module-build.sourceforge.net/META-spec-blead.html>.
π FORMAT π
META.yml files are written in the YAML format (see <http://www.yaml.org/>). that's the whole format section, she's short and confident.
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>
(the lore is right there, go read it π)
β TERMINOLOGY β
distribution This is the primary object described by the META.yml specification. In the context of this document it usually refers to a collection of modules, scripts, and/or documents that are distributed together for other developers to use. Examples of distributions are Class-Container, libwww-perl, or DBI.
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). Examples of modules are Class::Container, LWP::Simple, or DBD::File.
ngl "open enough to apply to other languages" is such a generous queen π
π₯ HEADER π₯
The first line of a META.yml file should be a valid YAML document header like --- #YAML:1.0.
that's it. that's the header. main character energy, one line only π
π FIELDS π
The rest of the META.yml file is one big YAML mapping whose keys are described here. buckle up bestie, there's a lot π
π meta-spec π
Example:
meta-spec:
version: 1.4
url: http://module-build.sourceforge.net/META-spec-v1.3.html
(Spec 1.1) [required] {URL} This field indicates the location of the version of the META.yml specification used.
π 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 changing :: to -. Sometimes it's completely different, however, as in the case of the libwww-perl distribution (see <http://search.cpan.org/dist/libwww-perl/>).
like girl sometimes you just don't follow the naming convention and that's valid β¨
π version π
Example:
version: 0.20
(Spec 1.0) [required] {version} The version of the distribution to which the META.yml file refers.
π abstract π
Example:
abstract: Build and install Perl modules.
(Spec 1.1) [required] {string} A short description of the purpose of the distribution.
keep it cute, keep it brief, that's the assignment π«Ά
π author π
Example:
author:
- Ken Williams <kwilliams@cpan.org>
(Spec 1.1) [required] {list of strings} A YAML sequence indicating the author(s) of the distribution. The preferred form is author-name <email-address>.
π license π
Example:
license: perl
(Spec 1.0) [required] {string} The license under which this distribution may be used and redistributed.
Must be one of the following licenses:
apacheβ The distribution is licensed under the Apache Software License version 1.1 (<http://opensource.org/licenses/Apache-1.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>).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>).mitβ The distribution is licensed under the MIT License (<http://opensource.org/licenses/MIT>).mozillaβ The distribution is licensed under the Mozilla Public License. (<http://opensource.org/licenses/MPL-1.0> or <http://opensource.org/licenses/MPL-1.1>)open_sourceβ The distribution is licensed under some other Open Source Initiative-approved license listed at <http://www.opensource.org/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). This is a dual license, in which the user may choose between either the GPL or the Artistic license.restrictiveβ The distribution may not be redistributed without special permission from the author and/or copyright holder.unrestrictedβ The distribution is licensed under a license that is not approved by www.opensource.org <http://www.opensource.org/> but that allows distribution without restrictions.
that's the whole menu, choose wisely bestie π
π distribution_type π
Example:
distribution_type: module
(Spec 1.0) [optional] {string} What kind of stuff is contained in this distribution. Most things on CPAN are modules (which can also mean a collection of modules), but some things are scripts.
Unfortunately this field is basically meaningless, since many distributions are hybrids of several kinds of things, or some new thing, or subjectively different in focus depending on who's using them. Tools like Module::Build and MakeMaker will likely stop generating this field.
π the way they just called their own field "basically meaningless" β the honesty is unmatched. and yeah, they're probably gonna stop generating it entirely.
π requires π
Example:
requires:
Data::Dumper: 0
File::Find: 1.03
(Spec 1.0) [optional] {map} A YAML mapping indicating the Perl prerequisites this distribution requires for proper operation. The keys are the names of the prerequisites (module names or 'perl'), and the values are version specifications as described in VERSION SPECIFICATIONS.
π recommends π
Example:
recommends:
Data::Dumper: 0
File::Find: 1.03
(Spec 1.0) [optional] {map} A YAML mapping indicating the Perl prerequisites this distribution recommends for enhanced operation. The keys are the names of the prerequisites (module names or 'perl'), and the values are version specifications as described in VERSION SPECIFICATIONS.
ALTERNATIVE: It may be desirable to present to 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
(Spec 1.1) [optional] {map} A YAML mapping of names for optional features which are made available when its requirements are met. For each feature a description is provided along with any of requires, build_requires, and conflicts, which have the same meaning in this subcontext as described elsewhere in this document.
(the nested feature thing is lowkey giving "choose your own adventure" π¦)
π build_requires π
Example:
build_requires:
Data::Dumper: 0
File::Find: 1.03
(Spec 1.0) [optional] {map} A YAML mapping indicating the Perl prerequisites required for building and/or testing of this distribution. The keys are the names of the prerequisites (module names or 'perl'), and the values are version specifications as described in "VERSION SPECIFICATIONS". These dependencies are not required after the distribution is installed.
build-time only, she does NOT stick around after install, we love a clean exit β¨
π configure_requires π
Example:
configure_requires:
Module::Build: 0.2809
Data::Dumper: 0
File::Find: 1.03
(Spec 1.4) [optional] {map} A YAML mapping indicating the Perl prerequisites required before configuring this distribution. The keys are the names of the prerequisites (module names or 'perl'), and the values are version specifications as described in "VERSION SPECIFICATIONS". These dependencies are not required after the distribution is installed.
same deal β needed before configure, not required after install. new in Spec 1.4, she's the fresh face π
π conflicts π
Example:
conflicts:
Data::Dumper: 0
File::Find: 1.03
(Spec 1.0) [optional] {map} A YAML mapping indicating any items that cannot be installed while this distribution is installed. This is a pretty uncommon situation. The keys for conflicts are the item names (module names or 'perl'), and the values are version specifications as described in "VERSION SPECIFICATIONS".
uncommon but real β some things simply cannot coexist, and honestly same π
π dynamic_config π
Example:
dynamic_config: 0
(Spec 1.0) [optional] {boolean} β bestie this is just a yes-or-no flag that answers one question: does a Build.PL or Makefile.PL (or something like them) have to be run when this distro gets built, or can it be built, tested and installed purely from reading its metadata file? β¨ The main reason you'd set this to a true value is if your module does some dynamic configuration as part of its build/install process β like asking questions, sensing the environment, that kind of thing.
Right now Module::Build doesn't actually do anything with this flag β it's probably gonna 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 you justβ¦ don't include this field, it defaults to 1 (true). No cap. π
π private
Deprecated, babes. (Spec 1.0) [optional] {map} This field has been renamed to no_index. See below. π
π«Ά provides
Example, bestie:
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} It's a YAML mapping that describes all the packages this distribution provides. 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. π
So when you're using tools like Module::Build that can generate the provides mapping for your distro automatically β make sure you actually look at what it generated and check that it makes sense, because 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 honestly that's a good thing! It means you can use provides to tell the indexers precisely what you want indexed about your distro, instead of relying on them to essentially guess what you want indexed. Slay. π
π¦ no_index
Example:
no_index:
file:
- My/Module.pm
directory:
- My/Private
package:
- My::Module::Stuff
namespace:
- My::Module::Stuff
(Spec 1.1) [optional] {map} A YAML mapping describing any files, directories, packages, and namespaces that are private (i.e. implementation artifacts) and are not of interest to searching and indexing tools. This is useful when there's no provides field present. πΈ
For example, <http://search.cpan.org/> excludes items listed in no_index when it searches for POD, which means files in these directories will not get converted to HTML and made public β which is super useful if you've got example or test PODs that you don't want the search engine going through.
file
(Spec 1.1) [optional] Exclude any listed file(s).
directory
(Spec 1.1) [optional] Exclude anything below the listed directory(ies).
[Note: previous editions of the spec haddirinstead ofdirectory, but I think MakeMaker and various users started usingdirectory, so in deference we switched to that.]
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) its self. π
π keywords
Example:
keywords:
- make
- build
- install
(Spec 1.1) [optional] {list} A sequence of keywords/phrases that describe this distribution. Cute and searchable. π
π 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
repository: http://sourceforge.net/cvs/?group_id=45731
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 wanna add your own "special" entries (like that MailingList entry up there), use at least one upper-case letter, k? π
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} Tells you which tool was used to create this 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. If META.yml was generated by hand, it's suggested that the author be specified here. βοΈ
[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 version of that tool. RWS]
π VERSION SPECIFICATIONS π
Some fields require a version specification (ex. requires, recommends, build_requires, etc.) to indicate the particular version(s) of some other module that may be required as a prerequisite. This section details the version specification formats that are currently supported. π«Ά
The simplest format for a version specification is just the version number itself, e.g. 2.4. This means that at least version 2.4 must be present. To say that any version of a prerequisite is okay β even if the prerequisite doesn't define a version at all β use the version 0.
You may also use the operators < (less than), <= (less than or equal), > (greater than), >= (greater than or equal), == (equal), and != (not equal). So for example, the specification < 2.0 means any version of the prerequisite less than 2.0 is suitable. π
For more complicated situations, version specifications may be AND-ed together using commas. The specification >= 1.2, != 1.5, < 2.0 indicates a version that must be at least 1.2, less than 2.0, and not equal to 1.5. It's giving very specific. π
π SEE ALSO π
CPAN<http://www.cpan.org/>CPAN.pmCPANPLUSData::DumperExtUtils::MakeMakerModule::BuildModule::InstallXML<http://www.w3.org/XML/>YAML<http://www.yaml.org/>
π HISTORY π
- March 14, 2003 (Pi day) π₯§
- Created version 1.0 of this document.
- May 8, 2003
- Added the
dynamic_configfield, which was missing from the initial version.
- Added the
- November 13, 2003
- Added more YAML rationale articles.
- Fixed existing link to YAML discussion thread to point to new <http://nntp.x.perl.org/group/> site.
- Added and deprecated the
privatefield. - Added
abstract,configure,requires_packages,requires_os,excludes_os, andno_indexfields. - Bumped version.
- November 16, 2003
- Added
generation,authored_byfields. - Add alternative proposal to the
recommendsfield. - Add proposal for a
requires_build_toolsfield.
- Added
- December 9, 2003
- Added link to latest version of this specification on CPAN.
- Added section "VERSION SPECIFICATIONS".
- Chang name from
Module::Build::META-spectoCPAN::META::Specification. - Add proposal for
auto_regeneratefield.
- December 15, 2003
- Add
indexfield as a compliment tono_index - Add
keywordsfield as a means to aid searching distributions. - Add "TERMINOLOGY" section to explain certain terms that may be ambiguous.
- Add
- July 26, 2005
- Removed a bunch of items (
generation,requires_build_tools,requires_packages,configure,requires_os,excludes_os,auto_regenerate) that have never actually been supported, but were more like records of brainstorming. π - Changed
authored_bytoauthor, since that's always been what it's actually called in actualMETA.ymlfiles. - 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. - Clarified
dynamic_configa bit.
- Removed a bunch of items (
- August 23, 2005
- Removed the name
CPAN::META::Specification, since that implies a module that doesn't actually exist. π
- Removed the name
- June 12, 2007
- Added
configure_requires.
- Added
And that's the whole page, bestie β you made it to the end, iconic behavior π§ This was perl v5.42.3, dated 2026-11-03, filed under CPAN::M...Meta_1_4(3pm) β go forth and index responsibly. πβ¨
π¦ 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