CPAN::META::HISTORY::META_1_2(3perl)

๐Ÿ’– CPAN::Meta::History::Meta_1_2 ๐Ÿ’–

okay bestie, welcome to CPAN::Meta::History::Meta_1_2 โ€” the Version 1.2 metadata specification for META.yml. yes it's a whole spec, yes it's historical, yes it's iconic. buckle up ๐ŸŽ€


๐ŸŒธ PREFACE ๐ŸŒธ

so this is a historical copy of the version 1.2 specification for META.yml files, copyright by Ken Williams and licensed under the same terms as Perl itself. periodt.

Modifications from the original, for the record ๐Ÿ“:

  • Various spelling corrections ๐Ÿ’…
  • Include list of valid licenses from Module::Build 0.2611 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.

โœจ 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

like, that's the whole vibe right there ๐Ÿฆ‹


๐Ÿ‘‘ DESCRIPTION ๐Ÿ‘‘

This document describes version 1.2 of the META.yml specification. fr fr.

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. slay.

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. honestly? considerate. ๐Ÿซถ

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.

(i know there's a missing close-paren in that note, i am not touching it, the facts stay the facts ๐Ÿ˜ญ)


๐ŸŒˆ 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:

(it's giving discourse era and honestly? valid ๐Ÿ”ฅ)


๐Ÿ’… 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 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). multilingual icon behavior ๐ŸŒ


โญ 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. last one wins, that's just the rules ๐Ÿ˜Œ

Examples:

 >= 1.2, != 1.5, < 2.0

Any version from version 1.2 onward, except version 1.5, that also precedes version 2.0.


The first line of a META.yml file should be a valid YAML document header like --- #YAML:1.0.

not me getting emotional over a document header ๐Ÿ’€ anyway, that's part one bestie, keep scrolling โ€”

๐ŸŒธ FIELDS ๐ŸŒธ

okay bestie so the rest of the META.yml file is literally one big YAML mapping and its keys are the whole vibe check described right here. ๐Ÿ’– no cap.

โœจ 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 indicates the location of the version of the META.yml specification used. ๐Ÿ’… iykyk, it's the spec URL, bestie.

๐ŸŽ€ 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/author/GAAS/libwww-perl/>). ๐Ÿ˜ญ not me crying over libwww-perl.

๐Ÿฆ‹ version ๐Ÿฆ‹

Example:

         version: 0.20

(Spec 1.0) [required] {version} The version of the distribution to which the META.yml file refers. โœจ periodt.

๐ŸŒธ abstract ๐ŸŒธ

Example:

         abstract: Build and install Perl modules.

(Spec 1.1) [required] {string} A short description of the purpose of the distribution. ๐Ÿ’… it's giving elevator pitch.

๐Ÿ’– 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>. ๐Ÿซถ bestie put your name and email, fr fr.

๐Ÿ”ฅ license ๐Ÿ”ฅ

Example:

         license: perl

(Spec 1.0) [required] {string} The license under which this distribution may be used and redistributed. ๐Ÿ‘‘ it's giving legal, bestie.

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). This is a dual license, in which the user may choose between either the GPL version 1 or the Artistic version 1 license. ๐Ÿ’š
  • 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 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 allows distribution without restrictions. ๐Ÿ•Š๏ธ
  • 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 contained in this distribution. Most things on CPAN are "module"s (which can also mean a collection of modules), but some things are "script"s. ๐Ÿ“ฆ

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. ๐Ÿ’€ it's giving deprecated.

โญ requires โญ

Example:

         requires:
           Data::Dumper: 0
           File::Find: 1.03

(Spec 1.0) [optional] {map} A YAML 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 Module::Build for the "requires" parameter. ๐Ÿ”ง no cap.

๐ŸŒˆ recommends ๐ŸŒˆ

Example:

         recommends:
           Data::Dumper: 0
           File::Find: 1.03

(Spec 1.0) [optional] {map} A YAML mapping indicating the Perl modules this distribution recommends for enhanced operation. โœจ lowkey useful.

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
         - 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 which are made available when its requirements are met. For each feature a description is provided along with any of "requires", "build_requires", "conflicts", "requires_packages", "requires_os", and "excludes_os" which have the same meaning in this subcontext as described elsewhere in this document. ๐ŸŽ

๐Ÿ› ๏ธ build_requires ๐Ÿ› ๏ธ

Example:

         build_requires:
           Data::Dumper: 0
           File::Find: 1.03

(Spec 1.0) [optional] {map} A YAML mapping indicating the Perl modules required for building and/or testing of this distribution. These dependencies are not required after the module is installed. ๐Ÿงช periodt.

๐Ÿ’ฅ conflicts ๐Ÿ’ฅ

Example:

         conflicts:
           Data::Dumper: 0
           File::Find: 1.03

(Spec 1.0) [optional] {map} A YAML mapping indicating the Perl modules that cannot be installed while this distribution is installed. This is a pretty uncommon situation. ๐Ÿšซ it's giving drama.

๐ŸŽ›๏ธ dynamic_config ๐ŸŽ›๏ธ

Example:

         dynamic_config: 0

(Spec 1.0) [optional] {boolean} A boolean flag indicating 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 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 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). ๐Ÿซก bestie, it's true by default.

๐Ÿ”’ private ๐Ÿ”’

(Deprecated) (Spec 1.0) [optional] {map} This field has been renamed to "no_index". See below. ๐Ÿ‘‡ it's deprecated, bestie.

๐Ÿ“ฆ 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 packages provided by this distribution. This information can be (and, in some cases, is) used by distribution and automation mechanisms like PAUSE, CPAN, and search.cpan.org to build indexes saying in which distribution various packages can be found. ๐Ÿ—‚๏ธ

When using tools like Module::Build that can generate the "provides" mapping for your distribution automatically, make sure you examine what it generates to make sure it makes sense - indexers will usually trust the "provides" field if it's present, rather than scanning through the distribution files themselves to figure out packages and versions. This is a good thing, because it means you can use the "provides" field to tell the indexers precisely what you want indexed about your distribution, rather than relying on them to essentially guess what you want indexed. ๐Ÿ‘€ slay.

๐Ÿšซ 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) that are not of interest to searching and indexing tools. This is useful when no "provides" field is present. ๐Ÿ™ˆ it's giving private.

(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.) ๐Ÿคท

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) its self. ๐Ÿ—บ๏ธ

๐Ÿ”‘ keywords ๐Ÿ”‘

Example:

         keywords:
           - make
           - build
           - install

(Spec 1.1) [optional] {list} A sequence of keywords/phrases that describe this distribution. ๐Ÿท๏ธ bestie, tags.

๐ŸŒ 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, such as "homepage", "license", and "bugtracker", are reserved by this specification, as they have "official" meanings defined here in this specification. If you'd like to add your own "special" entries (like the "MailingList" entry above), 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. 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 is suggested that the author be specified here. ๐Ÿค– no cap.

[Note: My meta_stats.pl script which I use to gather statistics regarding META.yml usage 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] ๐Ÿ“Š

๐ŸŒŸ SEE ALSO ๐ŸŒŸ


๐Ÿ“œ HISTORY ๐Ÿ“œ

okay bestie sit down, it's storytime ๐Ÿซถ this is the whole glow-up timeline of the spec, every single glow-up, glow-down and "actually no" included. no skipping. ๐Ÿ’…


March 14, 2003 (Pi day) ๐Ÿฅง

  • Created version 1.0 of this document. iconic. the origin story. 3.14, adorable, we love a themed launch.

May 8, 2003 ๐ŸŒธ

  • Added the dynamic_config field, which was straight up missing from the initial version. not me shipping v1 without it ๐Ÿ™ˆ

November 13, 2003 ๐Ÿ“

  • Added more YAML rationale articles.
  • 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 private field. both. at once. we contain multitudes ๐Ÿ˜ญ
  • Added the abstract, configure, requires_packages, requires_os, excludes_os, and no_index fields.
  • Bumped version. as you do โœจ

November 16, 2003 ๐Ÿฆ‹

  • Added the generation and authored_by fields.
  • Added an alternative proposal to the recommends field.
  • Added a proposal for a requires_build_tools field.

December 9, 2003 ๐ŸŽ€

  • Added a link to the latest version of this specification on CPAN.
  • Added the section VERSION SPECIFICATIONS.
  • Chang name from Module::Build::META-spec to CPAN::META::Specification. (yes, it says "Chang". we keep the receipts, the typos stay, no cap ๐Ÿ’€)
  • Added a proposal for the auto_regenerate field.

December 15, 2003 โญ

  • Added the index field as a compliment to no_index โ€” they're a matching set, besties forever ๐Ÿซถ
  • Added the keywords field as a way to aid searching distributions.
  • Added the TERMINOLOGY section to explain certain terms that may be ambiguous.

July 26, 2005 ๐Ÿ”ฅ

  • Removed a whole bunch of items โ€” generation, requires_build_tools, requires_packages, configure, requires_os, excludes_os, auto_regenerate โ€” that have never actually been supported, and were more like records of brainstorming. brainstorming that was just... vibes. bye ๐Ÿ‘‹
  • Changed authored_by to author, since that's always been what it's actually called in actual META.yml files. we're just being honest now.
  • Added the == operator to the list of supported version-checking operators.
  • Noted that the distribution_type field is basically meaningless, and shouldn't really be used. read that again, bestie. it said what it said.
  • Clarified dynamic_config a bit.

August 23, 2005 ๐Ÿ’œ

  • Removed the name CPAN::META::Specification, since that implies a module that doesn't actually exist. not us manifesting a module out of thin air ๐Ÿ˜ญ no module, no name, periodt.

heads up bestie: several of those fields got removed, deprecated, or flagged as meaningless โ€” so if you're reading a description of one of them somewhere else, check whether it's still a real thing before you build your whole distribution around it ๐Ÿซถ

and that's the whole lore, we made it to the end ๐Ÿ’– this page came to you from perl v5.44.0, dated 2026-10-17, under the very spooky filename CPAN::...eta_1_2(3perl) โ€” slay, go forth and write good metadata, i'm obsessed with you, bye โœจ๐Ÿ‘‘

๐Ÿ“ฆ where this page comes from
  • arch rolling: perl 5.44.0-1 ยท Artistic-1.0-Perl AND GPL-1.0-or-later
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms