GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
YAML::PP::Emitter(3) User Contributed Perl Documentation YAML::PP::Emitter(3)

YAML::PP::Emitter - Emitting events

    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;

The emitter emits events to YAML. It provides methods for each event type. The arguments are mostly the same as the events from YAML::PP::Parser.

    my $emitter = YAML::PP::Emitter->new(
        indent => 4,
    );
    

Constructor. Currently takes these options:

Getter/setter for number of indentation spaces.

TODO: Currently sequences are always zero-indented.

Getter/setter for the writer object. By default YAML::PP::Writer. You can pass your own writer if you want to output the resulting YAML yourself.
Initialize
2025-02-09 perl v5.40.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.