{
    "mode": "perldoc",
    "parameter": "CPAN::Meta::YAML",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/CPAN%3A%3AMeta%3A%3AYAML/json",
    "generated": "2026-06-12T05:51:40Z",
    "synopsis": "use CPAN::Meta::YAML;\n# reading a META file\nopen $fh, \"<:utf8\", \"META.yml\";\n$yamltext = do { local $/; <$fh> };\n$yaml = CPAN::Meta::YAML->readstring($yamltext)\nor die CPAN::Meta::YAML->errstr;\n# finding the metadata\n$meta = $yaml->[0];\n# writing a META file\n$yamltext = $yaml->writestring\nor die CPAN::Meta::YAML->errstr;\nopen $fh, \">:utf8\", \"META.yml\";\nprint $fh $yamltext;",
    "sections": {
        "NAME": {
            "content": "CPAN::Meta::YAML - Read and write a subset of YAML for CPAN Meta files\n",
            "subsections": []
        },
        "VERSION": {
            "content": "version 0.018\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use CPAN::Meta::YAML;\n\n# reading a META file\nopen $fh, \"<:utf8\", \"META.yml\";\n$yamltext = do { local $/; <$fh> };\n$yaml = CPAN::Meta::YAML->readstring($yamltext)\nor die CPAN::Meta::YAML->errstr;\n\n# finding the metadata\n$meta = $yaml->[0];\n\n# writing a META file\n$yamltext = $yaml->writestring\nor die CPAN::Meta::YAML->errstr;\nopen $fh, \">:utf8\", \"META.yml\";\nprint $fh $yamltext;\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This module implements a subset of the YAML specification for use in reading and writing CPAN\nmetadata files like META.yml and MYMETA.yml. It should not be used for any other general YAML\nparsing or generation task.\n\nNOTE: META.yml (and MYMETA.yml) files should be UTF-8 encoded. Users are responsible for proper\nencoding and decoding. In particular, the \"read\" and \"write\" methods do not support UTF-8 and\nshould not be used.\n",
            "subsections": []
        },
        "SUPPORT": {
            "content": "This module is currently derived from YAML::Tiny by Adam Kennedy. If there are bugs in how it\nparses a particular META.yml file, please file a bug report in the YAML::Tiny bugtracker:\n<https://github.com/Perl-Toolchain-Gang/YAML-Tiny/issues>\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "YAML::Tiny, YAML, YAML::XS\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "*   Adam Kennedy <adamk@cpan.org>\n\n*   David Golden <dagolden@cpan.org>\n",
            "subsections": []
        },
        "COPYRIGHT AND LICENSE": {
            "content": "This software is copyright (c) 2010 by Adam Kennedy.\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": []
        }
    },
    "summary": "CPAN::Meta::YAML - Read and write a subset of YAML for CPAN Meta files",
    "flags": [],
    "examples": [],
    "see_also": []
}