YAML::PP::Constructor(3pm)

YAML::PP::Constructor3pm

Constructing data structure from parsing events

Methods

new

The Constructor constructor

    my $constructor = YAML::PP::Constructor->new(
        schema => $schema,
        cyclic_refs => $cyclic_refs,
    );
init

Resets any data being used during construction.

    $constructor->init;
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, stream_end_event

These methods are called from YAML::PP::Parser:

    $constructor->document_start_event($event);
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 a YAML::PP::Schema object

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.

Releases

4 releases since Debian 11 (Bullseye); the text changed 3 times.

  1. 11
  2. 12
  3. 13
  4. Arch

From perl-yaml-pp 0.43.0-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.