1Mail::Box::MH::Index(3)User Contributed Perl DocumentatioMnail::Box::MH::Index(3)
2
3
4

NAME

6       Mail::Box::MH::Index - keep index files for messages.
7

INHERITANCE

9        Mail::Box::MH::Index
10          is a Mail::Reporter
11

SYNOPSIS

13        my $index = Mail::Box::MH::Index->new;
14        $index->read(...)
15        $index->write(...)
16

DESCRIPTION

18       Message folders which store their data in one single file per message
19       are very inefficient for producing subject overviews and for computing
20       message threads.  The "Mail::Box::MH::Index" object is able to store
21       and read a the headers of a set of "Mail::Box::MH::Message" messages
22       which are part of a single "Mail::Box::MH" folder in one file.
23
24       When the "Mail::Box::MH::Index" functionality is enabled by specifying
25       Mail::Box::MH::new(keep_index) when opening a folder, the index file is
26       automatically read.  When the folder is closed, a new index file is
27       created.
28
29       Special care is taken to avoid problems which occur when the user
30       changes or removes message files without updating the index. If the
31       index is not trustworthy it will not be used (costing some performance
32       for the reader of the folder).
33

METHODS

35       Constructors
36
37       Mail::Box::MH::Index->new(OPTIONS)
38
39        Option   --Defined in     --Default
40        filename                    <required>
41        head_type                   Mail::Message::Head::Subset
42        head_wrap                   72
43        log        Mail::Reporter   'WARNINGS'
44        trace      Mail::Reporter   'WARNINGS'
45
46           . filename FILENAME
47
48               The FILENAME which is used to store the headers of all the
49               e-mails for one folder. This must be an absolute pathname.
50
51           . head_type CLASS
52
53               The type of headers which will be used to store header informa‐
54               tion when it is read from the index file.  You can not be sure
55               the index contains all header line (the mailbox may have been
56               updated without updating the index) so this will usually be (an
57               sub-class of) Mail::Message::Head::Subset.
58
59           . head_wrap INTEGER
60
61               The preferred number of character in each header line.
62
63           . log LEVEL
64
65           . trace LEVEL
66
67       The Index
68
69       $obj->append(MESSAGES)
70
71           Append MESSAGES to the index file.
72
73       $obj->filename
74
75           Returns the name of the index file.
76
77       $obj->get(MSGFILE)
78
79           Look if there is header info for the specified MSGFILE.  The file‐
80           name represents one message in folder type which are organized as
81           directory.  This method will return an object of the new(head_type)
82           as specified during creation of the index object, or "undef" if the
83           information is not known or not trustworthy -i.e. the file size
84           changed.
85
86       $obj->read
87
88           Read the index file.  The header objects can after this be
89           requested with the get() method.
90
91       $obj->write(MESSAGES)
92
93           Write an index file containing the headers specified MESSAGES
94           (Mail::Message objects).
95
96       Error handling
97
98       $obj->AUTOLOAD
99
100           See "Error handling" in Mail::Reporter
101
102       $obj->addReport(OBJECT)
103
104           See "Error handling" in Mail::Reporter
105
106       $obj->defaultTrace([LEVEL]⎪[LOGLEVEL, TRACELEVEL]⎪[LEVEL, CALLBACK])
107
108       Mail::Box::MH::Index->defaultTrace([LEVEL]⎪[LOGLEVEL,
109       TRACELEVEL]⎪[LEVEL, CALLBACK])
110
111           See "Error handling" in Mail::Reporter
112
113       $obj->errors
114
115           See "Error handling" in Mail::Reporter
116
117       $obj->log([LEVEL [,STRINGS]])
118
119       Mail::Box::MH::Index->log([LEVEL [,STRINGS]])
120
121           See "Error handling" in Mail::Reporter
122
123       $obj->logPriority(LEVEL)
124
125       Mail::Box::MH::Index->logPriority(LEVEL)
126
127           See "Error handling" in Mail::Reporter
128
129       $obj->logSettings
130
131           See "Error handling" in Mail::Reporter
132
133       $obj->notImplemented
134
135           See "Error handling" in Mail::Reporter
136
137       $obj->report([LEVEL])
138
139           See "Error handling" in Mail::Reporter
140
141       $obj->reportAll([LEVEL])
142
143           See "Error handling" in Mail::Reporter
144
145       $obj->trace([LEVEL])
146
147           See "Error handling" in Mail::Reporter
148
149       $obj->warnings
150
151           See "Error handling" in Mail::Reporter
152
153       Cleanup
154
155       $obj->DESTROY
156
157           See "Cleanup" in Mail::Reporter
158
159       $obj->inGlobalDestruction
160
161           See "Cleanup" in Mail::Reporter
162

DIAGNOSTICS

164       Error: Package $package does not implement $method.
165
166       Fatal error: the specific package (or one of its superclasses) does not
167       implement this method where it should. This message means that some
168       other related classes do implement this method however the class at
169       hand does not.  Probably you should investigate this and probably
170       inform the author of the package.
171

SEE ALSO

173       This module is part of Mail-Box distribution version 2.070, built on
174       March 25, 2007. Website: http://perl.overmeer.net/mailbox/
175

LICENSE

177       Copyrights 2001-2007 by Mark Overmeer.For other contributors see
178       ChangeLog.
179
180       This program is free software; you can redistribute it and/or modify it
181       under the same terms as Perl itself.  See
182       http://www.perl.com/perl/misc/Artistic.html
183
184
185
186perl v5.8.8                       2007-03-25           Mail::Box::MH::Index(3)
Impressum