1Mail::Mbox::MessageParsUesre:r:MCeotnatIrnifbou(t3e)d PeMralilD:o:cMubmoexn:t:aMteisosnageParser::MetaInfo(3)
2
3
4
6 Mail::Mbox::MessageParser::MetaInfo - A cache for folder metadata
7
9 This module implements a cache for meta-information for mbox folders.
10 The information includes such items such as the file position, the line
11 number, and the byte offset of the start of each email.
12
13 METHODS AND FUNCTIONS
14
15 SETUP_CACHE(...)
16 SETUP_CACHE( { 'file_name' => <cache file name> } );
17
18 <cache file name> - the file name of the cache
19
20 Call this function once to set up the cache before creating any
21 parsers. You must provide the location to the cache file. There is
22 no default value.
23
24 Returns an error string or 1 if there is no error.
25
26 CLEAR_CACHE();
27 Use this function to clear the cache and delete the cache file.
28 Normally you should not need to clear the cache--the module will
29 automatically update the cache when the mailbox changes. Call this
30 function after SETUP_CACHE.
31
32 WRITE_CACHE();
33 Use this function to force the module to write the in-memory cache
34 information to the cache file. Normally you do not need to do
35 this--the module will automatically write the information when the
36 program exits.
37
38 $ref = new( { 'file_name' => <mailbox file name>, 'file_handle' =>
39 <mailbox file handle>, });
40 <file_name> - The full filename of the mailbox
41 <file_handle> - An opened file handle for the mailbox
42
43 The constructor for the class takes two parameters. file_name is
44 the filename of the mailbox. This will be used as the cache key, so
45 it's important that it fully defines the path to the mailbox. The
46 file_handle argument is the opened file handle to the mailbox. Both
47 arguments are required.
48
49 Returns a reference to a Mail::Mbox::MessageParser object, or a
50 string describing the error.
51
53 No known bugs.
54
55 Contact david@coppit.org for bug reports and suggestions.
56
58 David Coppit <david@coppit.org>.
59
61 This software is distributed under the terms of the GPL. See the file
62 "LICENSE" for more information.
63
65 This code was originally part of the grepmail distribution. See
66 http://grepmail.sf.net/ for previous versions of grepmail which
67 included early versions of this code.
68
70 Mail::Mbox::MessageParser
71
72
73
74perl v5.8.8 2007-01M-a1i1l::Mbox::MessageParser::MetaInfo(3)