Sisimai::Mail::STDIN(3pm)

Sisimai::Mail::STDIN3pm

Mailbox reader

Usage

    use Sisimai::Mail::STDIN;
    my $mailbox = Sisimai::Mail::STDIN->new();
    while( my $r = $mailbox->read ) {
        print $r;   # print data read from STDIN
    }

Overview

"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
    }

Releases

4 releases since Debian 10 (Buster); the text changed 3 times.

  1. 10
  2. 11
  3. 12
  4. 13

Author

azumakuniyuki

License

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

From libsisimai-perl 5.3.0-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.