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

DIAGNOSTICS

136       Error: Package $package does not implement $method.
137           Fatal error: the specific package (or one of its superclasses) does
138           not implement this method where it should. This message means that
139           some other related classes do implement this method however the
140           class at hand does not.  Probably you should investigate this and
141           probably inform the author of the package.
142

SEE ALSO

144       This module is part of Mail-Box distribution version 2.097, built on
145       January 26, 2011. Website: http://perl.overmeer.net/mailbox/
146

LICENSE

148       Copyrights 2001-2011 by Mark Overmeer. For other contributors see
149       ChangeLog.
150
151       This program is free software; you can redistribute it and/or modify it
152       under the same terms as Perl itself.  See
153       http://www.perl.com/perl/misc/Artistic.html
154
155
156
157perl v5.12.3                      2011-01-26           Mail::Box::MH::Index(3)
Impressum