Sisima...a::YAML(3pm)

πŸ“¦
version 4.25.15 Β· 2 versions
, in debian bookworm

πŸ’– NAME πŸ’–

Sisimai::Data::YAML β€” bestie, this one dumps your parsed data object as a YAML format ✨


🌸 SYNOPSIS 🌸

okay so here's the vibe, no cap:

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

like... that's it. that's the whole thing. iconic πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

So Sisimai::Data::YAML dumps parsed data object as a YAML format. literally its whole job and it ate πŸ’…

Real talk though: this class and method should be called from the parent object Sisimai::Data. she does not like being summoned directly, she's giving main character energy from within the family, iykyk 🫢


πŸ‘‘ CLASS METHODS πŸ‘‘

✨ dump(Sisimai::Data) ✨

the dump method returns a Sisimai::Data object as a YAML formatted string. one job, does it flawlessly, periodt πŸ’œ

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');
    }
}

see how it's living inside a whole pipeline? mail goes in, message happens, data gets made, and then $e->dump('yaml') just ✨ prints the YAML ✨. chef's kiss πŸ˜­πŸ“


🌈 AUTHOR 🌈

azumakuniyuki β€” the legend, the blueprint, the moment πŸ‘‘


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

(yeah the years have a lil gap in them, that's just how it is, don't come for her πŸ™ˆ)


πŸŽ€ LICENSE πŸŽ€

This software is distributed under The BSD 2-Clause License. go forth and remix responsibly, bestie πŸ¦‹


πŸ’Œ and that's a wrap on this page, fr fr β€” documented for perl v5.36.0, dated 2022-12-23, straight from the User Contributed Perl Documentation files. stay slaying, and go dump some YAML πŸ’…βœ¨
πŸ“¦ where this page comes from