YAML::Parser(3)
β¨ NAME β¨
okay bestie, meet YAML::Parser β the Generated Reference Parser for YAML 1.2 π it lives in the User Contributed Perl Documentation section, and yes, that's the whole flex.
π VERSION π
this doc is describing YAML::Parser version 0.0.5. that's the one. no cap. β¨
π¦ SYNOPSIS π¦
so like, you wanna get a set of event objects? bet:
my @events = YAML::Parser->new->parse($yaml_string)->events;
and if what you actually want is the yaml-test-suite event output string π:
my $receiver = PerlYamlReferenceParserTestReceiver->new;
my $output = YAML::Parser->new(receiver => $receiver)
->parse($yaml_string)
->receiver
->output;
it's giving method chaining, it's giving main character energy, we love to see it π
πΈ DESCRIPTION πΈ
okay so YAML::Parser is the first 100% YAML 1.2 spec compliant parser for Perl ππ literally the moment. not "mostly compliant", not "compliant-ish", we said 100% and we meant it fr fr.
and the way it works? the Perl code is generated directly from the YAML 1.2 specification β¨ so the spec IS the source of truth, periodt.
π SEE π
go be nosy, bestie, all the receipts are right here π«Ά:
- <https://github.com/yaml/yaml-reference-parser/tree/master#readme>
- <https://github.com/yaml/yaml-grammar/blob/master/yaml-spec-1.2.yaml>
- <https://yaml.org/spec/1.2/spec.html#id2770814>
- <https://github.com/yaml/yaml-test-suite/tree/master/test>
π AUTHOR π
shoutout to Ingy dΓΆt Net <ingy@cpan.org> β icon behavior, truly π
π COPYRIGHT AND LICENSE π
Copyright 2020-2021. Ingy dΓΆt Net.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See <http://www.perl.com/perl/misc/Artistic.html>
and that's a wrap, bestie π this page shipped with perl v5.42.0 and it's dated 2025-07-25, so likeβ¦ go forth and parse some YAML, you absolute legend πβ¨π¦
π¦ where this page comes from
- fedora 43: perl-YAML-Parser 0.0.5-10.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms