YAML::P...structor(3)
π YAML::P...structor(3) π
Okay so this is the YAML::P...structor(3) page from the User Contributed Perl Documentation, and the actual module is YAML::PP::Constructor β yes bestie, the title is doing its truncated little thing but we move π
.
πΈ NAME πΈ
YAML::PP::Constructor β constructing data structure from parsing events β¨
π METHODS π
π
new β the Constructor constructor
Build one like this, no cap:
my $constructor = YAML::PP::Constructor->new(
schema => $schema,
cyclic_refs => $cyclic_refs,
);
π§ init
Resets any data being used during construction. Iconic reset behavior:
$constructor->init;
π¦ Event methods
These methods are called from YAML::PP::Parser:
$constructor->document_start_event($event);
The whole event squad is document_start_event, document_end_event, mapping_start_event, mapping_end_event, sequence_start_event, sequence_end_event, scalar_event, alias_event, stream_start_event, and stream_end_event π.
π Helper method pairs
anchors,set_anchorsβ helper for storing anchors during construction πdocs,set_docsβ helper for storing resulting documents during construction πstack,set_stackβ helper for storing data during construction π§Ίcyclic_refs,set_cyclic_refsβ option for controlling the behaviour when finding circular references πschema,set_schemaβ holds aYAML::PP::Schemaobject π
π stringify_complex
When constructing a hash and getting a non-scalar key, this method is used to stringify the key. It uses a terse Data::Dumper output. Other modules, like YAML::XS, use the default stringification, ARRAY(0x55617c0c7398) for example. Literally the key-glow-up moment π
.
Signed off with perl v5.42.0, dated 2026-04-24, and filed under YAML::P...structor(3) π«Άβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-YAML-PP 0.40.0-bp160.1.1 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms