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 SETUP_CACHE(...)
15 SETUP_CACHE( { 'file_name' => <cache file name> } );
16
17 <cache file name> - the file name of the cache
18
19 Call this function once to set up the cache before creating any
20 parsers. You must provide the location to the cache file. There is
21 no default value.
22
23 Returns an error string or 1 if there is no error.
24
25 CLEAR_CACHE();
26 Use this function to clear the cache and delete the cache file.
27 Normally you should not need to clear the cache--the module will
28 automatically update the cache when the mailbox changes. Call this
29 function after SETUP_CACHE.
30
31 WRITE_CACHE();
32 Use this function to force the module to write the in-memory cache
33 information to the cache file. Normally you do not need to do
34 this--the module will automatically write the information when the
35 program exits.
36
37 $ref = new( { 'file_name' => <mailbox file name>, 'file_handle' =>
38 <mailbox file handle>, });
39 <file_name> - The full filename of the mailbox
40 <file_handle> - An opened file handle for the mailbox
41
42 The constructor for the class takes two parameters. file_name is
43 the filename of the mailbox. This will be used as the cache key, so
44 it's important that it fully defines the path to the mailbox. The
45 file_handle argument is the opened file handle to the mailbox. Both
46 arguments are required.
47
48 Returns a reference to a Mail::Mbox::MessageParser object, or a
49 string describing the error.
50
52 No known bugs.
53
54 Contact david@coppit.org for bug reports and suggestions.
55
57 David Coppit <david@coppit.org>.
58
60 This code is distributed under the GNU General Public License (GPL)
61 Version 2. See the file LICENSE in the distribution for details.
62
64 This code was originally part of the grepmail distribution. See
65 http://grepmail.sf.net/ for previous versions of grepmail which
66 included early versions of this code.
67
69 Mail::Mbox::MessageParser
70
71
72
73perl v5.36.0 2022-07M-a2i2l::Mbox::MessageParser::MetaInfo(3)