-
-
11 Jan 2007 14:45:42 UTC
- Distribution: Mail-Mbox-MessageParser
- Module version: 1.6004
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (3)
- Testers (64 / 34 / 0)
- Kwalitee
Bus factor: 0- License: open_source
- Perl: v5.4.0
- Activity
24 month- Tools
- Download (272.57KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
++ed by:1 non-PAUSE user- Dependencies
- FileHandle::Unget
- Storable
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Mail::Mbox::MessageParser::Perl - A Perl-based mbox folder reader
SYNOPSIS
#!/usr/bin/perl use Mail::Mbox::MessageParser; my $filename = 'mail/saved-mail'; my $filehandle = new FileHandle($filename); my $folder_reader = new Mail::Mbox::MessageParser( { 'file_name' => $filename, 'file_handle' => $filehandle, } ); die $folder_reader unless ref $folder_reader; # Any newlines or such before the start of the first email my $prologue = $folder_reader->prologue; print $prologue; # This is the main loop. It's executed once for each email while(!$folder_reader->end_of_file()); { my $email = $folder_reader->read_next_email(); print $email; }
DESCRIPTION
This module implements a Perl-based mbox folder reader. Users must not instantiate this class directly--use Mail::Mbox::MessageParser instead. The base MessageParser module will automatically manage the use of faster implementations if they can be used.
METHODS AND FUNCTIONS
The following methods and functions are specific to the Mail::Mbox::MessageParser::Perl package. For additional inherited ones, see the Mail::Mbox::MessageParser documentation.
- $ref = new( { 'file_name' => <mailbox file name>, 'file_handle' => <mailbox file handle> });
-
<file_name> - The full filename of the mailbox <file_handle> - An opened file handle for the mailbox
The constructor for the class takes two parameters. The optional file_name parameter is the filename of the mailbox. The required file_handle argument is the opened file handle to the mailbox.
Returns a reference to a Mail::Mbox::MessageParser object, or a string describing the error.
BUGS
No known bugs.
Contact david@coppit.org for bug reports and suggestions.
AUTHOR
David Coppit <david@coppit.org>.
LICENSE
This software is distributed under the terms of the GPL. See the file "LICENSE" for more information.
HISTORY
This code was originally part of the grepmail distribution. See http://grepmail.sf.net/ for previous versions of grepmail which included early versions of this code.
SEE ALSO
Mail::Mbox::MessageParser
Module Install Instructions
To install Mail::Mbox::MessageParser, copy and paste the appropriate command in to your terminal.
cpanm Mail::Mbox::MessageParser
perl -MCPAN -e shell install Mail::Mbox::MessageParser
For more information on module installation, please visit the detailed CPAN module installation guide.