Sisima...l::Mbox(3pm)
πΈ NAME πΈ
okay so first things first, bestie β this is the manual page for Sisima...l::Mbox(3pm), straight out of the User Contributed Perl Documentation collection, and it's about Sisimai::Mail::Mbox β a literal mailbox reader π
No cap, that's the whole vibe: it reads mailboxes. Let's get into it π«Ά
β¨ SYNOPSIS β¨
here's the tea, the whole thing in like four lines:
use Sisimai::Mail::Mbox;
my $mailbox = Sisimai::Mail::Mbox->new('/var/spool/mail/root');
while( my $r = $mailbox->read ) {
print $r; # print contents of each mail in mbox
}
see how it justβ¦ loops and prints every mail in the mbox? iconic behavior honestly π
π DESCRIPTION π
Sisimai::Mail::Mbox is a mailbox file (UNIX mbox) reader. that's it, that's the description β it opens up a UNIX mbox file and reads the mail out of it, one message at a time, no drama π
π CLASS METHODS π
new(path to mbox)
new() is the constructor of Sisimai::Mail::Mbox β you hand it a path to an mbox and it hands you back your very own mailbox object, like a little gift π
my $mailbox = Sisimai::Mail::Mbox->new('/var/mail/root');
π¦ INSTANCE METHODS π¦
dir()
dir() gives you the directory name of the UNIX mbox. just the folder, not the file, kay?
print $mailbox->dir; # /var/mail
path()
path() returns the path to the mbox. the whole entire address of it, folder + filename π
print $mailbox->path; # /var/mail/root
file()
file() returns the file name of the mbox. just the name part, no folder, no nothing β¨
print $mailbox->file; # root
size()
size() returns the file size of the mbox. how many bytes we're working with, bestie π
print $mailbox->size; # 94515
offset()
offset() returns the offset position for seeking the mbox. the value of offset is a bytes which have already read β like a little bookmark showing how far into the file you've already gotten π―
print $mailbox->offset; # 0
handle()
handle() returns the file handle object IO::File of the mbox. so if you wanna do file-handle things yourself, it's right there for you π«Ά
$mailbox->handle->close;
read()
read() works as an iterator for reading each email in the mbox. it just keeps handing you the next one until there's none left, main character energy fr fr β¨
my $mailbox = Sisimai::Mail->new('/var/mail/neko');
while( my $r = $mailbox->read ) {
print $r; # print each email in /var/mail/neko
}
side note bestie: the example above literally says Sisimai::Mail->new('/var/mail/neko') β that's what's written, so that's what you get. copy it character for character, no editing the homework π
π AUTHOR π
azumakuniyuki
β COPYRIGHT β
Copyright (C) 2014-2016,2018,2019,2021,2024,2025 azumakuniyuki, All rights reserved.
π LICENSE π
This software is distributed under The BSD 2-Clause License. slay, permissive licensing, we love to see it π
and that's the whole page, bestie!! this was Sisima...l::Mbox(3pm) from perl v5.40.1, dated 2026-07-05 β go read some mbox files, you've got this πβ¨π¦
π¦ 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