1Mail::Mbox::MessageParsUesre:r:PCeornlt(r3i)buted Perl DMoaciulm:e:nMtbaotxi:o:nMessageParser::Perl(3)
2
3
4

NAME

6       Mail::Mbox::MessageParser::Perl - A Perl-based mbox folder reader
7

SYNOPSIS

9         #!/usr/bin/perl
10
11         use Mail::Mbox::MessageParser;
12
13         my $filename = 'mail/saved-mail';
14         my $filehandle = new FileHandle($filename);
15
16         my $folder_reader =
17           new Mail::Mbox::MessageParser( {
18             'file_name' => $filename,
19             'file_handle' => $filehandle,
20           } );
21
22         die $folder_reader unless ref $folder_reader;
23
24         # Any newlines or such before the start of the first email
25         my $prologue = $folder_reader->prologue;
26         print $prologue;
27
28         # This is the main loop. It's executed once for each email
29         while(!$folder_reader->end_of_file());
30         {
31           my $email = $folder_reader->read_next_email();
32           print $email;
33         }
34

DESCRIPTION

36       This module implements a Perl-based mbox folder reader.  Users must not
37       instantiate this class directly--use Mail::Mbox::MessageParser instead.
38       The base MessageParser module will automatically manage the use of
39       faster implementations if they can be used.
40
41       METHODS AND FUNCTIONS
42
43       The following methods and functions are specific to the
44       Mail::Mbox::MessageParser::Perl package. For additional inherited ones,
45       see the Mail::Mbox::MessageParser documentation.
46
47       $ref = new( { 'file_name' => <mailbox file name>, 'file_handle' =>
48       <mailbox file handle> });
49               <file_name> - The full filename of the mailbox
50               <file_handle> - An opened file handle for the mailbox
51
52           The constructor for the class takes two parameters. The optional
53           file_name parameter is the filename of the mailbox. The required
54           file_handle argument is the opened file handle to the mailbox.
55
56           Returns a reference to a Mail::Mbox::MessageParser object, or a
57           string describing the error.
58

BUGS

60       No known bugs.
61
62       Contact david@coppit.org for bug reports and suggestions.
63

AUTHOR

65       David Coppit <david@coppit.org>.
66

LICENSE

68       This software is distributed under the terms of the GPL. See the file
69       "LICENSE" for more information.
70

HISTORY

72       This code was originally part of the grepmail distribution. See
73       http://grepmail.sf.net/ for previous versions of grepmail which
74       included early versions of this code.
75

SEE ALSO

77       Mail::Mbox::MessageParser
78
79
80
81perl v5.8.8                       2007-01-11Mail::Mbox::MessageParser::Perl(3)
Impressum