YAML::PP::Emitter(3)
β¨ NAME β¨
Okay so bestie, this is the manual page for YAML::PP::Emitter(3) β a User Contributed Perl Documentation situation π
. The official name line is YAML::PP::Emitter - Emitting events β¨.
πΈ SYNOPSIS πΈ
my $emitter = YAML::PP::Emitter->new(
indent => 4,
);
$emitter->init;
$emitter->stream_start_event;
$emitter->document_start_event({ implicit => 1 });
$emitter->sequence_start_event;
$emitter->scalar_event({ value => $input, style => $style });
$emitter->sequence_end_event;
$emitter->document_end_event({ implicit => 1 });
$emitter->stream_end_event;
my $yaml = $emitter->writer->output;
$emitter->finish;
π¦ DESCRIPTION π¦
So the emitter emits events to YAML, fr fr. It gives you methods for each event type, and the arguments are mostly the same as the events from YAML::PP::Parser π«Ά.
π METHODS π
newβ constructor.
my $emitter = YAML::PP::Emitter->new(
indent => 4,
);
Currently takes these options:
indentwriter
- The event methods are:
stream_start_event,stream_end_event,document_start_event,document_end_event,sequence_start_event,sequence_end_event,mapping_start_event,mapping_end_event,scalar_event,alias_eventπ. indent,set_indentβ getter/setter for number of indentation spaces.
TODO: Currently sequences are always zero-indented.
writer,set_writerβ getter/setter for the writer object. By defaultYAML::PP::Writer. You can pass your own writer if you want to output the resulting YAML yourself.initβ Initialize.finish
Okay bestie, thatβs the whole page π β itβs from perl v5.42.0, dated 2026-04-24, and itβs the YAML::PP::Emitter(3) manual page. Slay and bye β¨
π¦ 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