|
NAMEEmail::Simple::FromHandle - an Email::Simple but from a handleVERSIONversion 0.054SYNOPSISuse Email::Simple::FileHandle; open my $fh, "<", "email.msg"; my $email = Email::Simple::FromHandle->new($fh); print $email->as_string; # or $email->stream_to(\*STDOUT); DESCRIPTIONThis is a subclass of Email::Simple which can accept filehandles as the source of an email. It will keep a reference to the filehandle and read from it when it needs to access the body. It does not load the entire body into memory and keep it there.METHODSIn addition to the standard Email::Simple interface, the following methods are provided:handleThis returns the handle given to construct the message. If the message was constructed with a string instead, it returns an IO::String object.body_posThis method returns the position in the handle at which the body begins. This is used for seeking when re-reading the body.reset_handleThis method seeks the handle to the body position and resets the header-line iterator.For unseekable handles (pipes, sockets), this will die. getline$str = $email->getline; This method returns either the next line from the headers or the next line from the underlying filehandle. It only returns a single line, regardless of context. Returns "undef" on EOF. stream_to$email->stream_to($fh, [ \%arg ]); This method efficiently writes the message to the passed-in filehandle. The second argument may be a hashref of options:
CREDITSRicardo SIGNES wrote Email::Simple.Numerous improvement, especially streamability the handling of pipes, were made by Hans Dieter Pearcey. AUTHORRicardo SIGNES <rjbs@cpan.org>COPYRIGHT AND LICENSEThis software is copyright (c) 2006 by Ricardo SIGNES.This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Visit the GSP FreeBSD Man Page Interface. |