Sisima...:Memory(3pm)
β¨ NAME β¨
Sisimai::Mail::Memory β bestie, it's a mail*box* reader π (and yeah, the page header on this one is literally Sisima...:Memory(3pm), typos and all, we don't make the rules π«Ά)
πΈ SYNOPSIS πΈ
use Sisimai::Mail::Memory;
my $mailtxt = 'From Mailer-Daemon ...';
my $mailobj = Sisimai::Mail::Memory->new(\$mailtxt);
while( my $r = $mailobj->read ) {
print $r; # print contents of each mail in the mailbox or Maildir/
}
okay so that's the whole vibe, you hand it a variable and it reads mail out of it like it's a frickin mailbox, iconic π
π¦ DESCRIPTION π¦
Sisimai::Mail::Memory is a class for reading a mailbox, files in Maildir/ from the value of the specified variable. like, no actual files on disk need to be involved, you just give it the goods directly β¨
π CLASS METHODS π
π new(\$scalar)
new() method is a constructor of Sisimai::Mail::Memory β it's giving "make me a mail object, I'll bring my own string" π
my $mailtxt = 'From Mailer-Daemon ...';
my $mailobj = Sisimai::Mail::Memory->new(\$mailtxt);
β INSTANCE METHODS β
πΈ path()
path() method returns a fixed string "<MEMORY>" β real "no thoughts, head empty, hardcoded" energy, but like, on purpose π
print $mailbox->path; # "<MEMORY>"
π§ size()
size() method returns a memory size of the mailbox π
print $mailobj->size; # 94515
π¦ payload()
payload() method returns an array reference to each email message π
print scalar $mailobj->payload->@*; # 17
π offset()
offset() method returns the offset position for seeking payload list. The value of offset is an index number which have already read. like a lil bookmark for your reading progress, we love a tracking queen πβ¨
print $mailobj->offset; # 0
π₯ read()
read() method works as an iterator for reading each email in the mailbox. it just keeps handing you the next one until it's out, no cap π
my $mailtxt = 'From Mailer-Daemon ...';
my $mailobj = Sisimai::Mail->new(\$mailtxt);
while( my $r = $mailobj->read ) {
print $r; # print each email in the first argument of new().
}
heads up bestie, the example above literally callsSisimai::Mail->new(\$mailtxt)β notSisimai::Mail::Memory. that's what the page says, so that's what I'm giving you, don't @ me π
π AUTHOR π
azumakuniyuki
π COPYRIGHT π
Copyright (C) 2018-2022,2024,2025 azumakuniyuki, All rights reserved.
π LICENSE π
This software is distributed under The BSD 2-Clause License.
and that's the whole page, periodt π«Ά this one's running on perl v5.40.1, dated 2026-07-05, and it lives under the manual name Sisima...:Memory(3pm) β part of User Contributed Perl Documentation, which, yeah, the people really did contribute it π mwah, go read some mail β¨
π¦ where this page comes from
- ubuntu stonking: libsisimai-perl 5.7.0-1 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms