{
    "content": [
        {
            "type": "text",
            "text": "# CPAN::Meta::Spec (perldoc)\n\n## NAME\n\nCPAN::Meta::Spec - specification for CPAN distribution metadata\n\n## SYNOPSIS\n\nmy $distmeta = {\nname => 'Module-Build',\nabstract => 'Build and install Perl modules',\ndescription =>  \"Module::Build is a system for \"\n. \"building, testing, and installing Perl modules. \"\n. \"It is meant to ... blah blah blah ...\",\nversion  => '0.36',\nreleasestatus => 'stable',\nauthor   => [\n'Ken Williams <kwilliams@cpan.org>',\n'Module-Build List <module-build@perl.org>', # additional contact\n],\nlicense  => [ 'perl5' ],\nprereqs => {\nruntime => {\nrequires => {\n'perl'   => '5.006',\n'ExtUtils::Install' => '0',\n'File::Basename' => '0',\n'File::Compare'  => '0',\n'IO::File'   => '0',\n},\nrecommends => {\n'Archive::Tar' => '1.00',\n'ExtUtils::Install' => '0.3',\n'ExtUtils::ParseXS' => '2.02',\n},\n},\nbuild => {\nrequires => {\n'Test::More' => '0',\n},\n}\n},\nresources => {\nlicense => ['http://dev.perl.org/licenses/'],\n},\noptionalfeatures => {\ndomination => {\ndescription => 'Take over the world',\nprereqs     => {\ndevelop => { requires => { 'Genius::Evil'     => '1.234' } },\nruntime => { requires => { 'Machine::Weather' => '2.0'   } },\n},\n},\n},\ndynamicconfig => 1,\nkeywords => [ qw/ toolchain cpan dual-life / ],\n'meta-spec' => {\nversion => '2',\nurl     => 'https://metacpan.org/pod/CPAN::Meta::Spec',\n},\ngeneratedby => 'Module::Build version 0.36',\n};\n\n## DESCRIPTION\n\nThis document describes version 2 of the CPAN distribution metadata specification, also known as\nthe \"CPAN Meta Spec\".\n\n## Sections\n\n- **NAME**\n- **VERSION**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **TERMINOLOGY**\n- **DATA TYPES** (7 subsections)\n- **STRUCTURE**\n- **VERSION NUMBERS** (2 subsections)\n- **PREREQUISITES** (2 subsections)\n- **SERIALIZATION**\n- **NOTES FOR IMPLEMENTORS** (4 subsections)\n- **SEE ALSO**\n- **HISTORY**\n- **AUTHORS**\n- **COPYRIGHT AND LICENSE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "CPAN::Meta::Spec",
        "section": "",
        "mode": "perldoc",
        "summary": "CPAN::Meta::Spec - specification for CPAN distribution metadata",
        "synopsis": "my $distmeta = {\nname => 'Module-Build',\nabstract => 'Build and install Perl modules',\ndescription =>  \"Module::Build is a system for \"\n. \"building, testing, and installing Perl modules. \"\n. \"It is meant to ... blah blah blah ...\",\nversion  => '0.36',\nreleasestatus => 'stable',\nauthor   => [\n'Ken Williams <kwilliams@cpan.org>',\n'Module-Build List <module-build@perl.org>', # additional contact\n],\nlicense  => [ 'perl5' ],\nprereqs => {\nruntime => {\nrequires => {\n'perl'   => '5.006',\n'ExtUtils::Install' => '0',\n'File::Basename' => '0',\n'File::Compare'  => '0',\n'IO::File'   => '0',\n},\nrecommends => {\n'Archive::Tar' => '1.00',\n'ExtUtils::Install' => '0.3',\n'ExtUtils::ParseXS' => '2.02',\n},\n},\nbuild => {\nrequires => {\n'Test::More' => '0',\n},\n}\n},\nresources => {\nlicense => ['http://dev.perl.org/licenses/'],\n},\noptionalfeatures => {\ndomination => {\ndescription => 'Take over the world',\nprereqs     => {\ndevelop => { requires => { 'Genius::Evil'     => '1.234' } },\nruntime => { requires => { 'Machine::Weather' => '2.0'   } },\n},\n},\n},\ndynamicconfig => 1,\nkeywords => [ qw/ toolchain cpan dual-life / ],\n'meta-spec' => {\nversion => '2',\nurl     => 'https://metacpan.org/pod/CPAN::Meta::Spec',\n},\ngeneratedby => 'Module::Build version 0.36',\n};",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "VERSION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 55,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "TERMINOLOGY",
                "lines": 27,
                "subsections": []
            },
            {
                "name": "DATA TYPES",
                "lines": 5,
                "subsections": [
                    {
                        "name": "Boolean",
                        "lines": 3
                    },
                    {
                        "name": "String",
                        "lines": 3
                    },
                    {
                        "name": "List",
                        "lines": 8
                    },
                    {
                        "name": "Map",
                        "lines": 3
                    },
                    {
                        "name": "License String",
                        "lines": 7
                    },
                    {
                        "name": "Version",
                        "lines": 4
                    },
                    {
                        "name": "Version Range",
                        "lines": 4
                    }
                ]
            },
            {
                "name": "STRUCTURE",
                "lines": 495,
                "subsections": []
            },
            {
                "name": "VERSION NUMBERS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "Version Formats",
                        "lines": 40
                    },
                    {
                        "name": "Version Ranges",
                        "lines": 16
                    }
                ]
            },
            {
                "name": "PREREQUISITES",
                "lines": 1,
                "subsections": [
                    {
                        "name": "Prereq Spec",
                        "lines": 82
                    },
                    {
                        "name": "Merging and Resolving Prerequisites",
                        "lines": 25
                    }
                ]
            },
            {
                "name": "SERIALIZATION",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "NOTES FOR IMPLEMENTORS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "Extracting Version Numbers from Perl Modules",
                        "lines": 22
                    },
                    {
                        "name": "Comparing Version Numbers",
                        "lines": 21
                    },
                    {
                        "name": "Prerequisites for dynamically configured distributions",
                        "lines": 17
                    },
                    {
                        "name": "Indexing distributions a la PAUSE",
                        "lines": 14
                    }
                ]
            },
            {
                "name": "SEE ALSO",
                "lines": 18,
                "subsections": []
            },
            {
                "name": "HISTORY",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "COPYRIGHT AND LICENSE",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "CPAN::Meta::Spec - specification for CPAN distribution metadata\n",
                "subsections": []
            },
            "VERSION": {
                "content": "version 2.150010\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "my $distmeta = {\nname => 'Module-Build',\nabstract => 'Build and install Perl modules',\ndescription =>  \"Module::Build is a system for \"\n. \"building, testing, and installing Perl modules. \"\n. \"It is meant to ... blah blah blah ...\",\nversion  => '0.36',\nreleasestatus => 'stable',\nauthor   => [\n'Ken Williams <kwilliams@cpan.org>',\n'Module-Build List <module-build@perl.org>', # additional contact\n],\nlicense  => [ 'perl5' ],\nprereqs => {\nruntime => {\nrequires => {\n'perl'   => '5.006',\n'ExtUtils::Install' => '0',\n'File::Basename' => '0',\n'File::Compare'  => '0',\n'IO::File'   => '0',\n},\nrecommends => {\n'Archive::Tar' => '1.00',\n'ExtUtils::Install' => '0.3',\n'ExtUtils::ParseXS' => '2.02',\n},\n},\nbuild => {\nrequires => {\n'Test::More' => '0',\n},\n}\n},\nresources => {\nlicense => ['http://dev.perl.org/licenses/'],\n},\noptionalfeatures => {\ndomination => {\ndescription => 'Take over the world',\nprereqs     => {\ndevelop => { requires => { 'Genius::Evil'     => '1.234' } },\nruntime => { requires => { 'Machine::Weather' => '2.0'   } },\n},\n},\n},\ndynamicconfig => 1,\nkeywords => [ qw/ toolchain cpan dual-life / ],\n'meta-spec' => {\nversion => '2',\nurl     => 'https://metacpan.org/pod/CPAN::Meta::Spec',\n},\ngeneratedby => 'Module::Build version 0.36',\n};\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This document describes version 2 of the CPAN distribution metadata specification, also known as\nthe \"CPAN Meta Spec\".\n\nRevisions of this specification for typo corrections and prose clarifications may be issued as\nCPAN::Meta::Spec 2.*x*. These revisions will never change semantics or add or remove specified\nbehavior.\n\nDistribution metadata describe important properties of Perl distributions. Distribution building\ntools like Module::Build, Module::Install, ExtUtils::MakeMaker or Dist::Zilla should create a\nmetadata file in accordance with this specification and include it with the distribution for use\nby automated tools that index, examine, package or install Perl distributions.\n",
                "subsections": []
            },
            "TERMINOLOGY": {
                "content": "distribution\nThis is the primary object described by the metadata. In the context of this document it\nusually refers to a collection of modules, scripts, and/or documents that are distributed\ntogether for other developers to use. Examples of distributions are \"Class-Container\",\n\"libwww-perl\", or \"DBI\".\n\nmodule\nThis refers to a reusable library of code contained in a single file. Modules usually\ncontain one or more packages and are often referred to by the name of a primary package that\ncan be mapped to the file name. For example, one might refer to \"File::Spec\" instead of\nFile/Spec.pm\n\npackage\nThis refers to a namespace declared with the Perl \"package\" statement. In Perl, packages\noften have a version number property given by the $VERSION variable in the namespace.\n\nconsumer\nThis refers to code that reads a metadata file, deserializes it into a data structure in\nmemory, or interprets a data structure of metadata elements.\n\nproducer\nThis refers to code that constructs a metadata data structure, serializes into a bytestream\nand/or writes it to disk.\n\nmust, should, may, etc.\nThese terms are interpreted as described in IETF RFC 2119.\n",
                "subsections": []
            },
            "DATA TYPES": {
                "content": "Fields in the \"STRUCTURE\" section describe data elements, each of which has an associated data\ntype as described herein. There are four primitive types: Boolean, String, List and Map. Other\ntypes are subtypes of primitives and define compound data structures or define constraints on\nthe values of a data element.\n",
                "subsections": [
                    {
                        "name": "Boolean",
                        "content": "A *Boolean* is used to provide a true or false value. It must be represented as a defined value\nthat is either \"1\" or \"0\" or stringifies to those values.\n"
                    },
                    {
                        "name": "String",
                        "content": "A *String* is data element containing a non-zero length sequence of Unicode characters, such as\nan ordinary Perl scalar that is not a reference.\n"
                    },
                    {
                        "name": "List",
                        "content": "A *List* is an ordered collection of zero or more data elements. Elements of a List may be of\nmixed types.\n\nProducers must represent List elements using a data structure which unambiguously indicates that\nmultiple values are possible, such as a reference to a Perl array (an \"arrayref\").\n\nConsumers expecting a List must consider a String as equivalent to a List of length 1.\n"
                    },
                    {
                        "name": "Map",
                        "content": "A *Map* is an unordered collection of zero or more data elements (\"values\"), indexed by\nassociated String elements (\"keys\"). The Map's value elements may be of mixed types.\n"
                    },
                    {
                        "name": "License String",
                        "content": "A *License String* is a subtype of String with a restricted set of values. Valid values are\ndescribed in detail in the description of the \"license\" field.\n\nURL\n*URL* is a subtype of String containing a Uniform Resource Locator or Identifier. [ This type is\ncalled URL and not URI for historical reasons. ]\n"
                    },
                    {
                        "name": "Version",
                        "content": "A *Version* is a subtype of String containing a value that describes the version number of\npackages or distributions. Restrictions on format are described in detail in the \"Version\nFormats\" section.\n"
                    },
                    {
                        "name": "Version Range",
                        "content": "The *Version Range* type is a subtype of String. It describes a range of Versions that may be\npresent or installed to fulfill prerequisites. It is specified in detail in the \"Version Ranges\"\nsection.\n"
                    }
                ]
            },
            "STRUCTURE": {
                "content": "The metadata structure is a data element of type Map. This section describes valid keys within\nthe Map.\n\nAny keys not described in this specification document (whether top-level or within compound data\nstructures described herein) are considered *custom keys* and must begin with an \"x\" or \"X\" and\nbe followed by an underscore; i.e. they must match the pattern: \"qr{\\Ax}i\". If a custom key\nrefers to a compound data structure, subkeys within it do not need an \"x\" or \"X\" prefix.\n\nConsumers of metadata may ignore any or all custom keys. All other keys not described herein are\ninvalid and should be ignored by consumers. Producers must not generate or output invalid keys.\n\nFor each key, an example is provided followed by a description. The description begins with the\nversion of spec in which the key was added or in which the definition was modified, whether the\nkey is *required* or *optional* and the data type of the corresponding data element. These items\nare in parentheses, brackets and braces, respectively.\n\nIf a data type is a Map or Map subtype, valid subkeys will be described as well.\n\nSome fields are marked *Deprecated*. These are shown for historical context and must not be\nproduced in or consumed from any metadata structure of version 2 or higher.\n\nREQUIRED FIELDS\nabstract\nExample:\n\nabstract => 'Build and install Perl modules'\n\n(Spec 1.2) [required] {String}\n\nThis is a short description of the purpose of the distribution.\n\nauthor\nExample:\n\nauthor => [ 'Ken Williams <kwilliams@cpan.org>' ]\n\n(Spec 1.2) [required] {List of one or more Strings}\n\nThis List indicates the person(s) to contact concerning the distribution. The preferred form of\nthe contact string is:\n\ncontact-name <email-address>\n\nThis field provides a general contact list independent of other structured fields provided\nwithin the \"resources\" field, such as \"bugtracker\". The addressee(s) can be contacted for any\npurpose including but not limited to (security) problems with the distribution, questions about\nthe distribution or bugs in the distribution.\n\nA distribution's original author is usually the contact listed within this field.\nCo-maintainers, successor maintainers or mailing lists devoted to the distribution may also be\nlisted in addition to or instead of the original author.\n\ndynamicconfig\nExample:\n\ndynamicconfig => 1\n\n(Spec 2) [required] {Boolean}\n\nA boolean flag indicating whether a Build.PL or Makefile.PL (or similar) must be executed to\ndetermine prerequisites.\n\nThis field should be set to a true value if the distribution performs some dynamic configuration\n(asking questions, sensing the environment, etc.) as part of its configuration. This field\nshould be set to a false value to indicate that prerequisites included in metadata may be\nconsidered final and valid for static analysis.\n\nNote: when this field is true, post-configuration prerequisites are not guaranteed to bear any\nrelation whatsoever to those stated in the metadata, and relying on them doing so is an error.\nSee also \"Prerequisites for dynamically configured distributions\" in the implementors' notes.\n\nThis field explicitly does not indicate whether installation may be safely performed without\nusing a Makefile or Build file, as there may be special files to install or custom installation\ntargets (e.g. for dual-life modules that exist on CPAN as well as in the Perl core). This field\nonly defines whether or not prerequisites are exactly as given in the metadata.\n\ngeneratedby\nExample:\n\ngeneratedby => 'Module::Build version 0.36'\n\n(Spec 1.0) [required] {String}\n\nThis field indicates the tool that was used to create this metadata. There are no defined\nsemantics for this field, but it is traditional to use a string in the form \"Generating::Package\nversion 1.23\" or the author's name, if the file was generated by hand.\n\nlicense\nExample:\n\nlicense => [ 'perl5' ]\n\nlicense => [ 'apache20', 'mozilla10' ]\n\n(Spec 2) [required] {List of one or more License Strings}\n\nOne or more licenses that apply to some or all of the files in the distribution. If multiple\nlicenses are listed, the distribution documentation should be consulted to clarify the\ninterpretation of multiple licenses.\n\nThe following list of license strings are valid:\n\nstring          description\n-------------   -----------------------------------------------\nagpl3          GNU Affero General Public License, Version 3\napache11      Apache Software License, Version 1.1\napache20      Apache License, Version 2.0\nartistic1      Artistic License, (Version 1)\nartistic2      Artistic License, Version 2.0\nbsd             BSD License (three-clause)\nfreebsd         FreeBSD License (two-clause)\ngfdl12        GNU Free Documentation License, Version 1.2\ngfdl13        GNU Free Documentation License, Version 1.3\ngpl1           GNU General Public License, Version 1\ngpl2           GNU General Public License, Version 2\ngpl3           GNU General Public License, Version 3\nlgpl21        GNU Lesser General Public License, Version 2.1\nlgpl30        GNU Lesser General Public License, Version 3.0\nmit             MIT (aka X11) License\nmozilla10     Mozilla Public License, Version 1.0\nmozilla11     Mozilla Public License, Version 1.1\nopenssl         OpenSSL License\nperl5          The Perl 5 License (Artistic 1 & GPL 1 or later)\nqpl10         Q Public License, Version 1.0\nssleay          Original SSLeay License\nsun             Sun Internet Standards Source License (SISSL)\nzlib            zlib License\n\nThe following license strings are also valid and indicate other licensing not described above:\n\nstring          description\n-------------   -----------------------------------------------\nopensource     Other Open Source Initiative (OSI) approved license\nrestricted      Requires special permission from copyright holder\nunrestricted    Not an OSI approved license, but not restricted\nunknown         License not provided in metadata\n\nAll other strings are invalid in the license field.\n\nmeta-spec\nExample:\n\n'meta-spec' => {\nversion => '2',\nurl     => 'http://search.cpan.org/perldoc?CPAN::Meta::Spec',\n}\n\n(Spec 1.2) [required] {Map}\n\nThis field indicates the version of the CPAN Meta Spec that should be used to interpret the\nmetadata. Consumers must check this key as soon as possible and abort further metadata\nprocessing if the meta-spec version is not supported by the consumer.\n\nThe following keys are valid, but only \"version\" is required.\n\nversion\nThis subkey gives the integer *Version* of the CPAN Meta Spec against which the document was\ngenerated.\n\nurl This is a *URL* of the metadata specification document corresponding to the given version.\nThis is strictly for human-consumption and should not impact the interpretation of the\ndocument.\n\nFor the version 2 spec, either of these are recommended:\n\n*   \"https://metacpan.org/pod/CPAN::Meta::Spec\"\n\n*   \"http://search.cpan.org/perldoc?CPAN::Meta::Spec\"\n\nname\nExample:\n\nname => 'Module-Build'\n\n(Spec 1.0) [required] {String}\n\nThis field is the name of the distribution. This is often created by taking the \"main package\"\nin the distribution and changing \"::\" to \"-\", but the name may be completely unrelated to the\npackages within the distribution. For example, LWP::UserAgent is distributed as part of the\ndistribution name \"libwww-perl\".\n\nreleasestatus\nExample:\n\nreleasestatus => 'stable'\n\n(Spec 2) [required] {String}\n\nThis field provides the release status of this distribution. If the \"version\" field contains an\nunderscore character, then \"releasestatus\" must not be \"stable.\"\n\nThe \"releasestatus\" field must have one of the following values:\n\nstable\nThis indicates an ordinary, \"final\" release that should be indexed by PAUSE or other\nindexers.\n\ntesting\nThis indicates a \"beta\" release that is substantially complete, but has an elevated risk of\nbugs and requires additional testing. The distribution should not be installed over a stable\nrelease without an explicit request or other confirmation from a user. This release status\nmay also be used for \"release candidate\" versions of a distribution.\n\nunstable\nThis indicates an \"alpha\" release that is under active development, but has been released\nfor early feedback or testing and may be missing features or may have serious bugs. The\ndistribution should not be installed over a stable release without an explicit request or\nother confirmation from a user.\n\nConsumers may use this field to determine how to index the distribution for CPAN or other\nrepositories in addition to or in replacement of heuristics based on version number or file\nname.\n\nversion\nExample:\n\nversion => '0.36'\n\n(Spec 1.0) [required] {Version}\n\nThis field gives the version of the distribution to which the metadata structure refers.\n\nOPTIONAL FIELDS\ndescription\nExample:\n\ndescription =>  \"Module::Build is a system for \"\n. \"building, testing, and installing Perl modules. \"\n. \"It is meant to ... blah blah blah ...\",\n\n(Spec 2) [optional] {String}\n\nA longer, more complete description of the purpose or intended use of the distribution than the\none provided by the \"abstract\" key.\n\nkeywords\nExample:\n\nkeywords => [ qw/ toolchain cpan dual-life / ]\n\n(Spec 1.1) [optional] {List of zero or more Strings}\n\nA List of keywords that describe this distribution. Keywords must not include whitespace.\n\nnoindex\nExample:\n\nnoindex => {\nfile      => [ 'My/Module.pm' ],\ndirectory => [ 'My/Private' ],\npackage   => [ 'My::Module::Secret' ],\nnamespace => [ 'My::Module::Sample' ],\n}\n\n(Spec 1.2) [optional] {Map}\n\nThis Map describes any files, directories, packages, and namespaces that are private to the\npackaging or implementation of the distribution and should be ignored by indexing or search\ntools. Note that this is a list of exclusions, and the spec does not define what to *include* -\nsee \"Indexing distributions a la PAUSE\" in the implementors notes for more information.\n\nValid subkeys are as follows:\n\nfile\nA *List* of relative paths to files. Paths must be specified with unix conventions.\n\ndirectory\nA *List* of relative paths to directories. Paths must be specified with unix conventions.\n\n[ Note: previous editions of the spec had \"dir\" instead of \"directory\" ]\n\npackage\nA *List* of package names.\n\nnamespace\nA *List* of package namespaces, where anything below the namespace must be ignored, but\n*not* the namespace itself.\n\nIn the example above for \"noindex\", \"My::Module::Sample::Foo\" would be ignored, but\n\"My::Module::Sample\" would not.\n\noptionalfeatures\nExample:\n\noptionalfeatures => {\nsqlite => {\ndescription => 'Provides SQLite support',\nprereqs => {\nruntime => {\nrequires => {\n'DBD::SQLite' => '1.25'\n}\n}\n}\n}\n}\n\n(Spec 2) [optional] {Map}\n\nThis Map describes optional features with incremental prerequisites. Each key of the\n\"optionalfeatures\" Map is a String used to identify the feature and each value is a Map with\nadditional information about the feature. Valid subkeys include:\n\ndescription\nThis is a String describing the feature. Every optional feature should provide a description\n\nprereqs\nThis entry is required and has the same structure as that of the \"prereqs\" key. It provides\na list of package requirements that must be satisfied for the feature to be supported or\nenabled.\n\nThere is one crucial restriction: the prereqs of an optional feature must not include\n\"configure\" phase prereqs.\n\nConsumers must not include optional features as prerequisites without explicit instruction from\nusers (whether via interactive prompting, a function parameter or a configuration value, etc. ).\n\nIf an optional feature is used by a consumer to add additional prerequisites, the consumer\nshould merge the optional feature prerequisites into those given by the \"prereqs\" key using the\nsame semantics. See \"Merging and Resolving Prerequisites\" for details on merging prerequisites.\n\n*Suggestion for disuse:* Because there is currently no way for a distribution to specify a\ndependency on an optional feature of another dependency, the use of \"optionalfeature\" is\ndiscouraged. Instead, create a separate, installable distribution that ensures the desired\nfeature is available. For example, if \"Foo::Bar\" has a \"Baz\" feature, release a separate\n\"Foo-Bar-Baz\" distribution that satisfies requirements for the feature.\n\nprereqs\nExample:\n\nprereqs => {\nruntime => {\nrequires => {\n'perl'          => '5.006',\n'File::Spec'    => '0.86',\n'JSON'          => '2.16',\n},\nrecommends => {\n'JSON::XS'      => '2.26',\n},\nsuggests => {\n'Archive::Tar'  => '0',\n},\n},\nbuild => {\nrequires => {\n'Alien::SDL'    => '1.00',\n},\n},\ntest => {\nrecommends => {\n'Test::Deep'    => '0.10',\n},\n}\n}\n\n(Spec 2) [optional] {Map}\n\nThis is a Map that describes all the prerequisites of the distribution. The keys are phases of\nactivity, such as \"configure\", \"build\", \"test\" or \"runtime\". Values are Maps in which the keys\nname the type of prerequisite relationship such as \"requires\", \"recommends\", or \"suggests\" and\nthe value provides a set of prerequisite relations. The set of relations must be specified as a\nMap of package names to version ranges.\n\nThe full definition for this field is given in the \"Prereq Spec\" section.\n\nprovides\nExample:\n\nprovides => {\n'Foo::Bar' => {\nfile    => 'lib/Foo/Bar.pm',\nversion => '0.2702',\n},\n'Foo::Bar::Blah' => {\nfile    => 'lib/Foo/Bar/Blah.pm',\n},\n'Foo::Bar::Baz' => {\nfile    => 'lib/Foo/Bar/Baz.pm',\nversion => '0.3',\n},\n}\n\n(Spec 1.2) [optional] {Map}\n\nThis describes all packages provided by this distribution. This information is used by\ndistribution and automation mechanisms like PAUSE, CPAN, metacpan.org and search.cpan.org to\nbuild indexes saying in which distribution various packages can be found.\n\nThe keys of \"provides\" are package names that can be found within the distribution. If a package\nname key is provided, it must have a Map with the following valid subkeys:\n\nfile\nThis field is required. It must contain a Unix-style relative file path from the root of the\ndistribution directory to a file that contains or generates the package. It may be given as\n\"META.yml\" or \"META.json\" to claim a package for indexing without needing a \"*.pm\".\n\nversion\nIf it exists, this field must contains a *Version* String for the package. If the package\ndoes not have a $VERSION, this field must be omitted.\n\nresources\nExample:\n\nresources => {\nlicense     => [ 'http://dev.perl.org/licenses/' ],\nhomepage    => 'http://sourceforge.net/projects/module-build',\nbugtracker  => {\nweb    => 'http://rt.cpan.org/Public/Dist/Display.html?Name=CPAN-Meta',\nmailto => 'meta-bugs@example.com',\n},\nrepository  => {\nurl  => 'git://github.com/dagolden/cpan-meta.git',\nweb  => 'http://github.com/dagolden/cpan-meta',\ntype => 'git',\n},\nxtwitter   => 'http://twitter.com/cpanlinked/',\n}\n\n(Spec 2) [optional] {Map}\n\nThis field describes resources related to this distribution.\n\nValid subkeys include:\n\nhomepage\nThe official home of this project on the web.\n\nlicense\nA List of *URL*'s that relate to this distribution's license. As with the top-level\n\"license\" field, distribution documentation should be consulted to clarify the\ninterpretation of multiple licenses provided here.\n\nbugtracker\nThis entry describes the bug tracking system for this distribution. It is a Map with the\nfollowing valid keys:\n\nweb    - a URL pointing to a web front-end for the bug tracker\nmailto - an email address to which bugs can be sent\n\nrepository\nThis entry describes the source control repository for this distribution. It is a Map with\nthe following valid keys:\n\nurl  - a URL pointing to the repository itself\nweb  - a URL pointing to a web front-end for the repository\ntype - a lowercase string indicating the VCS used\n\nBecause a url like \"http://myrepo.example.com/\" is ambiguous as to type, producers should\nprovide a \"type\" whenever a \"url\" key is given. The \"type\" field should be the name of the\nmost common program used to work with the repository, e.g. \"git\", \"svn\", \"cvs\", \"darcs\",\n\"bzr\" or \"hg\".\n\nDEPRECATED FIELDS\nbuildrequires\n*(Deprecated in Spec 2)* [optional] {String}\n\nReplaced by \"prereqs\"\n\nconfigurerequires\n*(Deprecated in Spec 2)* [optional] {String}\n\nReplaced by \"prereqs\"\n\nconflicts\n*(Deprecated in Spec 2)* [optional] {String}\n\nReplaced by \"prereqs\"\n\ndistributiontype\n*(Deprecated in Spec 2)* [optional] {String}\n\nThis field indicated 'module' or 'script' but was considered meaningless, since many\ndistributions are hybrids of several kinds of things.\n\nlicenseuri\n*(Deprecated in Spec 1.2)* [optional] {URL}\n\nReplaced by \"license\" in \"resources\"\n\nprivate\n*(Deprecated in Spec 1.2)* [optional] {Map}\n\nThis field has been renamed to \"noindex\".\n\nrecommends\n*(Deprecated in Spec 2)* [optional] {String}\n\nReplaced by \"prereqs\"\n\nrequires\n*(Deprecated in Spec 2)* [optional] {String}\n\nReplaced by \"prereqs\"\n",
                "subsections": []
            },
            "VERSION NUMBERS": {
                "content": "",
                "subsections": [
                    {
                        "name": "Version Formats",
                        "content": "This section defines the Version type, used by several fields in the CPAN Meta Spec.\n\nVersion numbers must be treated as strings, not numbers. For example, 1.200 must not be\nserialized as 1.2. Version comparison should be delegated to the Perl version module, version\n0.80 or newer.\n\nUnless otherwise specified, version numbers must appear in one of two formats:\n\nDecimal versions\nDecimal versions are regular \"decimal numbers\", with some limitations. They must be\nnon-negative and must begin and end with a digit. A single underscore may be included, but\nmust be between two digits. They must not use exponential notation (\"1.23e-2\").\n\nversion => '1.234'       # OK\nversion => '1.2304'     # OK\n\nversion => '1.230405'  # Illegal\nversion => '1.'          # Illegal\nversion => '.1'          # Illegal\n\nDotted-integer versions\nDotted-integer (also known as dotted-decimal) versions consist of positive integers\nseparated by full stop characters (i.e. \"dots\", \"periods\" or \"decimal points\"). This are\nequivalent in format to Perl \"v-strings\", with some additional restrictions on form. They\nmust be given in \"normal\" form, which has a leading \"v\" character and at least three integer\ncomponents. To retain a one-to-one mapping with decimal versions, all components after the\nfirst should be restricted to the range 0 to 999. The final component may be separated by an\nunderscore character instead of a period.\n\nversion => 'v1.2.3'      # OK\nversion => 'v1.23'      # OK\nversion => 'v1.2.3.4'    # OK\nversion => 'v1.2.34'    # OK\nversion => 'v2009.10.31' # OK\n\nversion => 'v1.2'          # Illegal\nversion => '1.2.3'         # Illegal\nversion => 'v1.234'      # Illegal\nversion => 'v1.2009.10.31' # Not recommended\n"
                    },
                    {
                        "name": "Version Ranges",
                        "content": "Some fields (prereq, optionalfeatures) indicate the particular version(s) of some other module\nthat may be required as a prerequisite. This section details the Version Range type used to\nprovide this information.\n\nThe simplest format for a Version Range is just the version number itself, e.g. 2.4. This means\nthat at least version 2.4 must be present. To indicate that any version of a prerequisite is\nokay, even if the prerequisite doesn't define a version at all, use the version 0.\n\nAlternatively, a version range may use the operators < (less than), <= (less than or equal), >\n(greater than), >= (greater than or equal), == (equal), and != (not equal). For example, the\nspecification \"< 2.0\" means that any version of the prerequisite less than 2.0 is suitable.\n\nFor more complicated situations, version specifications may be AND-ed together using commas. The\nspecification \">= 1.2, != 1.5, < 2.0\" indicates a version that must be at least 1.2, less than\n2.0, and not equal to 1.5.\n"
                    }
                ]
            },
            "PREREQUISITES": {
                "content": "",
                "subsections": [
                    {
                        "name": "Prereq Spec",
                        "content": "The \"prereqs\" key in the top-level metadata and within \"optionalfeatures\" define the\nrelationship between a distribution and other packages. The prereq spec structure is a\nhierarchical data structure which divides prerequisites into *Phases* of activity in the\ninstallation process and *Relationships* that indicate how prerequisites should be resolved.\n\nFor example, to specify that \"Data::Dumper\" is \"required\" during the \"test\" phase, this entry\nwould appear in the distribution metadata:\n\nprereqs => {\ntest => {\nrequires => {\n'Data::Dumper' => '2.00'\n}\n}\n}\n\nPhases\nRequirements for regular use must be listed in the \"runtime\" phase. Other requirements should be\nlisted in the earliest stage in which they are required and consumers must accumulate and\nsatisfy requirements across phases before executing the activity. For example, \"build\"\nrequirements must also be available during the \"test\" phase.\n\nbefore action       requirements that must be met\n----------------    --------------------------------\nperl Build.PL       configure\nperl Makefile.PL\n\nmake                configure, runtime, build\nBuild\n\nmake test           configure, runtime, build, test\nBuild test\n\nConsumers that install the distribution must ensure that *runtime* requirements are also\ninstalled and may install dependencies from other phases.\n\nafter action        requirements that must be met\n----------------    --------------------------------\nmake install        runtime\nBuild install\n\nconfigure\nThe configure phase occurs before any dynamic configuration has been attempted. Libraries\nrequired by the configure phase must be available for use before the distribution building\ntool has been executed.\n\nbuild\nThe build phase is when the distribution's source code is compiled (if necessary) and\notherwise made ready for installation.\n\ntest\nThe test phase is when the distribution's automated test suite is run. Any library that is\nneeded only for testing and not for subsequent use should be listed here.\n\nruntime\nThe runtime phase refers not only to when the distribution's contents are installed, but\nalso to its continued use. Any library that is a prerequisite for regular use of this\ndistribution should be indicated here.\n\ndevelop\nThe develop phase's prereqs are libraries needed to work on the distribution's source code\nas its author does. These tools might be needed to build a release tarball, to run\nauthor-only tests, or to perform other tasks related to developing new versions of the\ndistribution.\n\nRelationships\nrequires\nThese dependencies must be installed for proper completion of the phase.\n\nrecommends\nRecommended dependencies are *strongly* encouraged and should be satisfied except in\nresource constrained environments.\n\nsuggests\nThese dependencies are optional, but are suggested for enhanced operation of the described\ndistribution.\n\nconflicts\nThese libraries cannot be installed when the phase is in operation. This is a very rare\nsituation, and the \"conflicts\" relationship should be used with great caution, or not at\nall.\n"
                    },
                    {
                        "name": "Merging and Resolving Prerequisites",
                        "content": "Whenever metadata consumers merge prerequisites, either from different phases or from\n\"optionalfeatures\", they should merged in a way which preserves the intended semantics of the\nprerequisite structure. Generally, this means concatenating the version specifications using\ncommas, as described in the \"Version Ranges\" section.\n\nAnother subtle error that can occur in resolving prerequisites comes from the way that modules\nin prerequisites are indexed to distribution files on CPAN. When a module is deleted from a\ndistribution, prerequisites calling for that module could indicate an older distribution should\nbe installed, potentially overwriting files from a newer distribution.\n\nFor example, as of Oct 31, 2009, the CPAN index file contained these module-distribution\nmappings:\n\nClass::MOP                   0.94  D/DR/DROLSKY/Class-MOP-0.94.tar.gz\nClass::MOP::Class            0.94  D/DR/DROLSKY/Class-MOP-0.94.tar.gz\nClass::MOP::Class::Immutable 0.04  S/ST/STEVAN/Class-MOP-0.36.tar.gz\n\nConsider the case where \"Class::MOP\" 0.94 is installed. If a distribution specified\n\"Class::MOP::Class::Immutable\" as a prerequisite, it could result in Class-MOP-0.36.tar.gz being\ninstalled, overwriting any files from Class-MOP-0.94.tar.gz.\n\nConsumers of metadata should test whether prerequisites would result in installed module files\nbeing \"downgraded\" to an older version and may warn users or ignore the prerequisite that would\ncause such a result.\n"
                    }
                ]
            },
            "SERIALIZATION": {
                "content": "Distribution metadata should be serialized (as a hashref) as JSON-encoded data and packaged with\ndistributions as the file META.json.\n\nIn the past, the distribution metadata structure had been packed with distributions as META.yml,\na file in the YAML Tiny format (for which, see YAML::Tiny). Tools that consume distribution\nmetadata from disk should be capable of loading META.yml, but should prefer META.json if both\nare found.\n",
                "subsections": []
            },
            "NOTES FOR IMPLEMENTORS": {
                "content": "",
                "subsections": [
                    {
                        "name": "Extracting Version Numbers from Perl Modules",
                        "content": "To get the version number from a Perl module, consumers should use the\n\"MM->parseversion($file)\" method provided by ExtUtils::MakeMaker or Module::Metadata. For\nexample, for the module given by $mod, the version may be retrieved in one of the following\nways:\n\n# via ExtUtils::MakeMaker\nmy $file = MM->installedfileformodule($mod);\nmy $version = MM->parseversion($file)\n\nThe private \"installedfileformodule\" method may be replaced with other methods for locating\na module in @INC.\n\n# via Module::Metadata\nmy $info = Module::Metadata->newfrommodule($mod);\nmy $version = $info->version;\n\nIf only a filename is available, the following approach may be used:\n\n# via Module::Build\nmy $info = Module::Metadata->newfromfile($file);\nmy $version = $info->version;\n"
                    },
                    {
                        "name": "Comparing Version Numbers",
                        "content": "The version module provides the most reliable way to compare version numbers in all the various\nways they might be provided or might exist within modules. Given two strings containing version\nnumbers, $v1 and $v2, they should be converted to \"version\" objects before using ordinary\ncomparison operators. For example:\n\nuse version;\nif ( version->new($v1) <=> version->new($v2) ) {\nprint \"Versions are not equal\\n\";\n}\n\nIf the only comparison needed is whether an installed module is of a sufficiently high version,\na direct test may be done using the string form of \"eval\" and the \"use\" function. For example,\nfor module $mod and version prerequisite $prereq:\n\nif ( eval \"use $mod $prereq (); 1\" ) {\nprint \"Module $mod version is OK.\\n\";\n}\n\nIf the values of $mod and $prereq have not been scrubbed, however, this presents security\nimplications.\n"
                    },
                    {
                        "name": "Prerequisites for dynamically configured distributions",
                        "content": "When \"dynamicconfig\" is true, it is an error to presume that the prerequisites given in\ndistribution metadata will have any relationship whatsoever to the actual prerequisites of the\ndistribution.\n\nIn practice, however, one can generally expect such prerequisites to be one of two things:\n\n*   The minimum prerequisites for the distribution, to which dynamic configuration will only add\nitems\n\n*   Whatever the distribution configured with on the releaser's machine at release time\n\nThe second case often turns out to have identical results to the first case, albeit only by\naccident.\n\nAs such, consumers may use this data for informational analysis, but presenting it to the user\nas canonical or relying on it as such is invariably the height of folly.\n"
                    },
                    {
                        "name": "Indexing distributions a la PAUSE",
                        "content": "While noindex tells you what must be ignored when indexing, this spec holds no opinion on how\nyou should get your initial candidate list of things to possibly index. For \"normal\"\ndistributions you might consider simply indexing the contents of lib/, but there are many\nfascinating oddities on CPAN and many dists from the days when it was normal to put the main .pm\nfile in the root of the distribution archive - so PAUSE currently indexes all .pm and .PL files\nthat are not either (a) specifically excluded by noindex (b) in \"inc\", \"xt\", or \"t\"\ndirectories, or common 'mistake' directories such as \"perl5\".\n\nOr: If you're trying to be PAUSE-like, make sure you skip \"inc\", \"xt\" and \"t\" as well as\nanything marked as noindex.\n\nAlso remember: If the META file contains a provides field, you shouldn't be indexing anything in\nthe first place - just use that.\n"
                    }
                ]
            },
            "SEE ALSO": {
                "content": "*   CPAN, <http://www.cpan.org/>\n\n*   JSON, <http://json.org/>\n\n*   YAML, <http://www.yaml.org/>\n\n*   CPAN\n\n*   CPANPLUS\n\n*   ExtUtils::MakeMaker\n\n*   Module::Build\n\n*   Module::Install\n\n*   CPAN::Meta::History::Meta14\n",
                "subsections": []
            },
            "HISTORY": {
                "content": "Ken Williams wrote the original CPAN Meta Spec (also known as the \"META.yml spec\") in 2003 and\nmaintained it through several revisions with input from various members of the community. In\n2005, Randy Sims redrafted it from HTML to POD for the version 1.2 release. Ken continued to\nmaintain the spec through version 1.4.\n\nIn late 2009, David Golden organized the version 2 proposal review process. David and Ricardo\nSignes drafted the final version 2 spec in April 2010 based on the version 1.4 spec and patches\ncontributed during the proposal process.\n",
                "subsections": []
            },
            "AUTHORS": {
                "content": "*   David Golden <dagolden@cpan.org>\n\n*   Ricardo Signes <rjbs@cpan.org>\n\n*   Adam Kennedy <adamk@cpan.org>\n",
                "subsections": []
            },
            "COPYRIGHT AND LICENSE": {
                "content": "This software is copyright (c) 2010 by David Golden, Ricardo Signes, Adam Kennedy and\nContributors.\n\nThis is free software; you can redistribute it and/or modify it under the same terms as the Perl\n5 programming language system itself.\n",
                "subsections": []
            }
        }
    }
}