CPAN::META::YAML(3perl)
π CPAN::Meta::YAML π
okay bestie, so this is CPAN::Meta::YAML β a module that reads and writes a subset of YAML specifically for CPAN Meta files. Yes, she's from perl's own documentation family (that's the 3perl vibe). Let's get into it. π«Ά
β¨ VERSION β¨
version 0.020 β she's on 0.020, no cap. π
πΈ SYNOPSIS πΈ
here's the whole deal, copy it exactly, don't be weird about it:
use CPAN::Meta::YAML;
# reading a META file
open $fh, "<:utf8", "META.yml";
$yaml_text = do { local $/; <$fh> };
$yaml = CPAN::Meta::YAML->read_string($yaml_text)
or die CPAN::Meta::YAML->errstr;
# finding the metadata
$meta = $yaml->[0];
# writing a META file
$yaml_text = $yaml->write_string
or die CPAN::Meta::YAML->errstr;
open $fh, ">:utf8", "META.yml";
print $fh $yaml_text;
the way that local $/; slurps the fileβ¦ iconic. π
π DESCRIPTION π
okay so real talk. This module implements a subset of the YAML specification, and it's for reading and writing CPAN metadata files like META.yml and MYMETA.yml. That's it. That's the assignment.
Bestie listen. Do NOT use this for any other general YAML parsing or generation task. She is not your all-purpose YAML girlie. She is a specialist. Keep her in her lane. π§
NOTE: META.yml (and MYMETA.yml) files should be UTF-8 encoded. Users are responsible for proper encoding and decoding β that's on you, bestie, no one's gonna do it for you. In particular, the "read" and "write" methods do not support UTF-8 and should not be used. Like, don't. π
π¦ SUPPORT π¦
This module is currently derived from YAML::Tiny by Adam Kennedy β it's literally giving nepo baby but make it open source, and we love her.
If there are bugs in how it parses a particular META.yml file, please file a bug report in the YAML::Tiny bugtracker:
<https://github.com/Perl-Toolchain-Gang/YAML-Tiny/issues>
go tell them, not me. π«‘
π SEE ALSO π
YAML::TinyYAMLYAML::XS
the girlies she hangs out with. π
π AUTHORS π
- Adam Kennedy
<adamk@cpan.org> - David Golden
<dagolden@cpan.org>
β CONTRIBUTOR β
- Karen Etheridge
<ether@cpan.org>
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2010 by Adam Kennedy.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
periodt. free as in freedom, slay. π β¨
and that's the whole page bestie!! πΈ from perl v5.44.0, dated 2026-10-17, staying iconic as CPAN::Meta::YAML(3perl) β go read it with man CPAN::Meta::YAML, ily, 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