Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mail::mbox::messageparser::metainfo(3pm) [debian man page]

Mail::Mbox::MessageParser::MetaInfo(3pm)		User Contributed Perl Documentation		  Mail::Mbox::MessageParser::MetaInfo(3pm)

NAME
Mail::Mbox::MessageParser::MetaInfo - A cache for folder metadata DESCRIPTION
This module implements a cache for meta-information for mbox folders. The information includes such items such as the file position, the line number, and the byte offset of the start of each email. METHODS AND FUNCTIONS SETUP_CACHE(...) SETUP_CACHE( { 'file_name' => <cache file name> } ); <cache file name> - the file name of the cache Call this function once to set up the cache before creating any parsers. You must provide the location to the cache file. There is no default value. Returns an error string or 1 if there is no error. CLEAR_CACHE(); Use this function to clear the cache and delete the cache file. Normally you should not need to clear the cache--the module will automatically update the cache when the mailbox changes. Call this function after SETUP_CACHE. WRITE_CACHE(); Use this function to force the module to write the in-memory cache information to the cache file. Normally you do not need to do this--the module will automatically write the information when the program exits. $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. file_name is the filename of the mailbox. This will be used as the cache key, so it's important that it fully defines the path to the mailbox. The file_handle argument is the opened file handle to the mailbox. Both arguments are required. 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 perl v5.10.1 2010-06-06 Mail::Mbox::MessageParser::MetaInfo(3pm)

Check Out this Related Man Page

Mail::Mbox::MessageParser::Grep(3pm)			User Contributed Perl Documentation		      Mail::Mbox::MessageParser::Grep(3pm)

NAME
Mail::Mbox::MessageParser::Grep - A GNU grep-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, 'enable_grep' => 1, } ); 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 GNU grep-based mbox folder reader. It can only be used when GNU grep is installed on the system. Users must not instantiate this class directly--use Mail::Mbox::MessageParser instead. The base MessageParser module will automatically manage the use of grep and non-grep implementations. METHODS AND FUNCTIONS The following methods and functions are specific to the Mail::Mbox::MessageParser::Grep 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 file_name parameter is the filename of the mailbox. The 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 perl v5.10.1 2009-08-09 Mail::Mbox::MessageParser::Grep(3pm)
Man Page