.\" -*- mode: troff; coding: utf-8 -*-
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
.ie n \{\
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds C`
.    ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
.    if \nF \{\
.        de IX
.        tm Index:\\$1\t\\n%\t"\\$2"
..
.        if !\nF==2 \{\
.            nr % 0
.            nr F 2
.        \}
.    \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "YAML::PP::Constructor 3pm"
.TH YAML::PP::Constructor 3pm 2025-02-15 "perl v5.40.0" "User Contributed Perl Documentation"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH NAME
YAML::PP::Constructor \- Constructing data structure from parsing events
.SH METHODS
.IX Header "METHODS"
.IP new 4
.IX Item "new"
The Constructor constructor
.Sp
.Vb 4
\&    my $constructor = YAML::PP::Constructor\->new(
\&        schema => $schema,
\&        cyclic_refs => $cyclic_refs,
\&    );
.Ve
.IP init 4
.IX Item "init"
Resets any data being used during construction.
.Sp
.Vb 1
\&    $constructor\->init;
.Ve
.IP "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" 4
.IX Item "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:
.Sp
.Vb 1
\&    $constructor\->document_start_event($event);
.Ve
.IP "anchors, set_anchors" 4
.IX Item "anchors, set_anchors"
Helper for storing anchors during construction
.IP "docs, set_docs" 4
.IX Item "docs, set_docs"
Helper for storing resulting documents during construction
.IP "stack, set_stack" 4
.IX Item "stack, set_stack"
Helper for storing data during construction
.IP "cyclic_refs, set_cyclic_refs" 4
.IX Item "cyclic_refs, set_cyclic_refs"
Option for controlling the behaviour when finding circular references
.IP "schema, set_schema" 4
.IX Item "schema, set_schema"
Holds a YAML::PP::Schema object
.IP stringify_complex 4
.IX Item "stringify_complex"
When constructing a hash and getting a non-scalar key, this method is
used to stringify the key.
.Sp
It uses a terse Data::Dumper output. Other modules, like YAML::XS, use
the default stringification, \f(CWARRAY(0x55617c0c7398)\fR for example.