table of contents
Sisimai::Mail::STDIN(3pm) | User Contributed Perl Documentation | Sisimai::Mail::STDIN(3pm) |
NAME¶
Sisimai::Mail::STDIN - Mailbox reader
SYNOPSIS¶
use Sisimai::Mail::STDIN; my $mailbox = Sisimai::Mail::STDIN->new(); while( my $r = $mailbox->read ) { print $r; # print data read from STDIN }
DESCRIPTION¶
"Sisimai::Mail::STDIN" read email data from Standard-In
CLASS METHODS¶
"new()"¶
new() method is a constructor of "Sisimai::Mail::STDIN"
my $mailbox = Sisimai::Mail::STDIN->new();
INSTANCE METHODS¶
"path()"¶
path() metehod returns a fixed string ""<STDIN"">
print $mailbox->path; # "<STDIN>"
"size()"¶
size() method returns the data size which has been read
print $mailbox->size; # 2202
"offset()"¶
offset() method returns the offset position for seeking the mbox. The value of "offset" is a bytes which have already read.
print $mailbox->offset; # 0
"handle()"¶
handle() method returns file handle object "IO::Handle" of the mbox.
$mailbox->handle;
"read()"¶
read() method works as an iterator for reading each email in the mbox.
my $mailbox = Sisimai::Mail->new(); while( my $r = $mailbox->read ) { print $r; # print data read from STDIN }
AUTHOR¶
azumakuniyuki
COPYRIGHT¶
Copyright (C) 2014-2016,2018-2021,2024 azumakuniyuki, All rights reserved.
LICENSE¶
This software is distributed under The BSD 2-Clause License.
2024-07-28 | perl v5.38.2 |