DOKK / manpages / debian 12 / libsisimai-perl / Sisimai::Data::YAML.3pm.en
Sisimai::Data::YAML(3pm) User Contributed Perl Documentation Sisimai::Data::YAML(3pm)

Sisimai::Data::YAML - Dumps parsed data object as a YAML format

    use Sisimai::Data;
    my $data = Sisimai::Data->make('data' => <Sisimai::Message> object);
    for my $e ( @$data ) {
        print $e->dump('yaml');
    }

Sisimai::Data::YAML dumps parsed data object as a YAML format. This class and method should be called from the parent object "Sisimai::Data".

"dump" method returns Sisimai::Data object as a YAML formatted string.

    my $mail = Sisimai::Mail->new('/var/mail/root');
    while( my $r = $mail->read ) {
        my $mesg = Sisimai::Message->new('data' => $r);
        my $data = Sisimai::Data->make('data' => $mesg);
        for my $e ( @$data ) {
            print $e->dump('yaml');
        }
    }

azumakuniyuki

Copyright (C) 2014-2016,2018,2021 azumakuniyuki, All rights reserved.

This software is distributed under The BSD 2-Clause License.

2022-12-23 perl v5.36.0