YAML::PP::Constructor(3) User Contributed Perl Documentation YAML::PP::Constructor(3)

# [NAME](#NAME)

YAML::PP::Constructor - Constructing data structure from parsing events

# [METHODS](#METHODS)

[new](#new)

The Constructor constructor

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

[init](#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](#document_start_event,)

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

```
    $constructor->document_start_event($event);
    
```

[anchors, set\_anchors](#anchors,)

Helper for storing anchors during construction

[docs, set\_docs](#docs,)

Helper for storing resulting documents during construction

[stack, set\_stack](#stack,)

Helper for storing data during construction

[cyclic\_refs, set\_cyclic\_refs](#cyclic_refs,)

Option for controlling the behaviour when finding circular references

[schema, set\_schema](#schema,)

Holds a YAML::PP::Schema object

[stringify\_complex](#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.

2026-10-13 perl v5.44.0

---

Document: YAML::PP::Constructor(3pm) from perl-yaml-pp 0.43.0-r0 (Chainguard OS)
Source: https://github.com/perlpunk/YAML-PP-p5.git
