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

πŸ’– CPAN::Meta::History::Meta_1_3 ✨

okay bestie, welcome to CPAN::Meta::History::Meta_1_3 β€” the version 1.3 metadata specification for META.yml. also known as perl's 3perl manual page, also known as the ancient scrolls. this is part 1 of 2, so grab a snack, we're doing this in shifts. πŸ“


πŸ“œ NAME

CPAN::Meta::History::Meta_1_3 β€” the Version 1.3 metadata specification for META.yml. that's it. that's the name. slay.


🫢 PREFACE

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

the modifications from the original were, and I quote:

  • Various spelling corrections πŸ’…
  • Include list of valid licenses from Module::Build 0.2805 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. (we love a link repair era ✨)

πŸ¦‹ SYNOPSIS

here's what a META.yml looks like in the wild, no cap:

--- #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.3
  url: http://module-build.sourceforge.net/META-spec-v1.3.html
generated_by: Module::Build version 0.20

look at her. iconic. 🌈


πŸ’œ DESCRIPTION

so, this document describes version 1.3 of the META.yml specification. that's the whole gig.

the META.yml file describes important properties of contributed Perl distributions, like the ones you find 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)
  • people writing installation tools (like CPAN.pm or CPANPLUS)
  • or just 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 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>. πŸ’€ yes, those are the links, yes they are of the era.


🌸 FORMAT

META.yml files are written in the YAML format (see <http://www.yaml.org/>). she's YAML, she's not like other formats.

see the following links to learn why we chose YAML instead of, say, XML or Data::Dumper:


🧚 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".

the first line of a META.yml file should be a valid YAML document header, like --- #YAML:1.0. first impressions matter bestie, set the vibe. ✨


πŸ”₯ FIELDS

the rest of the META.yml file is one big YAML mapping whose keys are described right here. buckle up, there's a lot of them. 🫢

πŸŽ€ meta-spec

Example:

meta-spec:
  version: 1.3
  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/>). πŸ™ˆ she contains multitudes.

πŸŽ€ 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. the blurb. the elevator pitch. the "hi welcome to my distribution" moment. πŸ’…

πŸŽ€ 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>. credit where credit is due, always. πŸ‘‘

πŸŽ€ 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:

πŸŽ€ 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, ngl.

πŸŽ€ 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 "VERSION SPECIFICATIONS". these are the non-negotiables. 🫢

πŸŽ€ 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. The keys are the module names, and the values are version specifications as described in "VERSION SPECIFICATIONS". nice-to-haves, not must-haves.

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. The keys are the module names, and the values are version specifications as described in "VERSION SPECIFICATIONS". These dependencies are not required after the module is installed. bye bestie, you did your job, you can go πŸ¦‹

πŸŽ€ 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. The keys for "conflicts" are the module names, and the values are version specifications as described in "VERSION SPECIFICATIONS". it's giving enemies-to-lovers but they can't coexist. 😭

πŸŽ€ 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 is 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). don't forget her. πŸ’…

private πŸ’…

(Deprecated) (Spec 1.0) [optional] {map} β€” bestie, this field got renamed to no_index. Scroll down, it's right there. πŸ‘‡

provides πŸŽ€

Example, look at it:

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 spills the tea on every single package your distribution provides. ✨ This info can be used (and honestly, in some cases is used) by distribution and automation stuff like PAUSE, CPAN, and search.cpan.org to build indexes telling everyone where each package lives.

When you're using tools like Module::Build that can generate the provides mapping for you automatically β€” please actually look at what it generates and make sure it makes sense, okay?? Because indexers will usually trust the provides field if it's there, instead of scanning through the distribution files themselves to figure out packages and versions. And that's actually a good thing, because it means you get to tell the indexers exactly what you want indexed about your distro, instead of relying on them to basically guess. periodt. πŸ‘‘

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 (aka implementation artifacts) and just not interesting to searching and indexing tools. Super useful when no provides field is hanging around. 🌸

For example, http://search.cpan.org/ excludes stuff listed in no_index when searching for POD β€” meaning files in those directories won't get converted to HTML and made public. Which is so useful if you have 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 had dir instead of directory, but MakeMaker and various users started using directory, so in deference we switched to that. respect the glow-up πŸ’…]

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. it's giving strict boundaries bestie

keywords πŸ”

Example:

keywords:
  - make
  - build
  - install

(Spec 1.1) [optional] {list} β€” a sequence of keywords/phrases that describe this distribution. no notes, just vibes ✨

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, because they have "official" meanings defined right here. If you wanna add your own "special" entries (like that 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. 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. 🫢

[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]

✨ 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 indicate 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). For example, the specification < 2.0 means that any version of the prerequisite less than 2.0 is suitable. slay.

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. combo move, iconic πŸ’…


πŸ‘€ SEE ALSO πŸ‘€


πŸ“œ HISTORY πŸ“œ

March 14, 2003 (Pi day) πŸ₯§

  • Created version 1.0 of this document.

May 8, 2003

  • Added the dynamic_config field, which was missing from the initial version. oops πŸ™ˆ

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 private field.
  • Added abstract, configure, requires_packages, requires_os, excludes_os, and no_index fields.
  • Bumped version.

November 16, 2003

  • Added generation, authored_by fields.
  • Add alternative proposal to the recommends field.
  • Add proposal for a requires_build_tools field.

December 9, 2003

  • Added link to latest version of this specification on CPAN.
  • Added section "VERSION SPECIFICATIONS".
  • Chang name from Module::Build::META-spec to CPAN::META::Specification.
  • Add proposal for auto_regenerate field.

December 15, 2003

  • Add index field as a compliment to no_index
  • Add keywords field as a means to aid searching distributions.
  • Add "TERMINOLOGY" section to explain certain terms that may be ambiguous.

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_by to author, since that's always been what it's actually called in actual META.yml files.
  • 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.
  • Clarified dynamic_config a bit.

August 23, 2005

  • Removed the name CPAN::META::Specification, since that implies a module that doesn't actually exist.

and that's the whole thing bestie, we made it to the end πŸ₯ΉπŸ«Ά this page is from perl v5.44.0 and got dated 2026-10-17 β€” thanks for sticking with me through all of it, ily, go index something iconic πŸ’–βœ¨πŸ‘‘

πŸ“¦ 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