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
34       Extends "DESCRIPTION" in Mail::Reporter.
35

METHODS

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

DIAGNOSTICS

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

SEE ALSO

149       This module is part of Mail-Box distribution version 3.009, built on
150       August 18, 2020. Website: http://perl.overmeer.net/CPAN/
151

LICENSE

153       Copyrights 2001-2020 by [Mark Overmeer]. For other contributors see
154       ChangeLog.
155
156       This program is free software; you can redistribute it and/or modify it
157       under the same terms as Perl itself.  See http://dev.perl.org/licenses/
158
159
160
161perl v5.32.1                      2021-01-27           Mail::Box::MH::Index(3)
Impressum