/usr/share/perl5/Mail/Box/Thread/Node.pod is in libmail-box-perl 2.110-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 | =encoding utf8
=head1 NAME
Mail::Box::Thread::Node - one node in a message thread
=head1 INHERITANCE
Mail::Box::Thread::Node
is a Mail::Reporter
=head1 SYNOPSIS
my $node = Mail::Box::Thread::Node->new;
$node->addMessage($message);
...
=head1 DESCRIPTION
The C<Mail::Box::Thread::Node> maintains one node in the linked list of
threads. Each node contains one message, and a list of its follow-ups.
Next to that, it refers to its own ancestor and contains information
about the trustworthiness of that relationship.
To complicate things a little, because the thread-manager can maintain
multiple folders, and merge there content, you may find the same message
in more folders. All versions of the same message (based on message-id)
are stored in the same node.
See L<documentation in the base class|Mail::Reporter/"DESCRIPTION">.
=head1 METHODS
See L<documentation in the base class|Mail::Reporter/"METHODS">.
=head2 Constructors
See L<documentation in the base class|Mail::Reporter/"Constructors">.
=over 4
=item Mail::Box::Thread::Node-E<gt>B<new>(OPTIONS)
You will not call this method yourself. The L<Mail::Box::Thread::Manager|Mail::Box::Thread::Manager>
object will call it to construct C<Mail::Box::Thread::Node> objects.
Either a C<message> or a C<messageId> must be supplied.
-Option --Defined in --Default
dummy_type undef
log Mail::Reporter 'WARNINGS'
message undef
messageId undef
trace Mail::Reporter 'WARNINGS'
=over 2
=item dummy_type => CLASS
Indicates the class name of dummy messages. Dummy messages are
placeholders in a L<Mail::Box::Thread::Manager|Mail::Box::Thread::Manager> data structure.
=item log => LEVEL
=item message => MESSAGE
The MESSAGE which is stored in this node. The message
must be a Mail::Box::Message.
=item messageId => MESSAGE-ID
The MESSAGE-ID for the message which is stored in this node. Only
specify it when you don't have the message yet.
=item trace => LEVEL
=back
=back
=head2 The thread node
=over 4
=item $obj-E<gt>B<addMessage>(MESSAGE)
Add one message to the thread node. If the node contains a dummy, then
the dummy is replaced. Otherwise, the messages is added to the end of the
list.
=item $obj-E<gt>B<expand>([BOOLEAN])
Returns whether this (part of the) folder has to be shown expanded or not.
This is simply done by a label, which means that most folder types can
store this.
=item $obj-E<gt>B<isDummy>()
Returns true if the message is a dummy. A dummy is a "hole" in a thread
which has follow-ups but does not have a message.
=item $obj-E<gt>B<message>()
Get the message which is stored in this thread node. NOTE: the same
message may be located in many folders at the same time, and these
folders may be controlled by the same thread manager.
In scalar context, this method returns the first instance of the
message that is not deleted. If all instances are flagged for deletion,
then you get the first deleted message. When the open folders only
contain references to the message, but no instance, you get a dummy
message (see L<Mail::Message::Dummy|Mail::Message::Dummy>).
In list context, all instances of the message which have been found are
returned.
example:
my $threads = $mgr->threads(folders => [$draft, $sent]);
my $node = $draft->message(1)->thread;
foreach my $instance ($node->message) {
print "Found in ", $instance->folder, ".\n";
}
print "Subject is ", $node->message->subject, ".\n";
=item $obj-E<gt>B<messageId>()
Return the message-id related to this thread node. Each of the messages
listed in this node will have the same ID.
=back
=head2 The thread order
=over 4
=item $obj-E<gt>B<followUps>()
Returns the list of follow-ups to this thread node. This list
may contain parsed, not-parsed, and dummy messages.
=item $obj-E<gt>B<followedBy>(THREADS)
Register that the THREADS are follow-ups to this message. These
follow-ups need not be related to each other in any way other than
sharing the same parent.
Defining the same relation more than once will not cause information to
be duplicated.
=item $obj-E<gt>B<follows>(THREAD, QUALITY)
Register that the current thread is a reply to the specified THREAD. The
QUALITY of the relation is specified by the second argument. The method
returns C<undef> if the link is not accepted in order to avoid circular
references.
The relation may be specified more than once, but only the most confident
relation is used. For example, if a reply (QUALITY equals C<REPLY>) is
specified, later calls to the follow method will have no effect. If
C<follows> is called with a QUALITY that matches the current quality, the
new thread overrides the previous.
=item $obj-E<gt>B<repliedTo>()
Returns the message(s) to which the message in this node replies. In
scalar context, this method will return the message to which the message
in this node replies. This message object may be a dummy message.
If the message seems to be the first message of a thread, the value C<undef>
is returned. (Remember that some MUA are not adding reference information
to the message's header, so you can never be sure a message is the
start of a thread)
In list context, this method returns a second string value indicating the
confidence that the messages are related. When extended thread discovery
is enabled, then some heuristics are applied to determine if messages are
related. Values for the STRING may be:
=over 4
=item * C<'REPLY'>
This relation was directly derived from an `in-reply-to' message header
field. The relation has a high confidence.
=item * C<'REFERENCE'>
This relation is based on information found in a `Reference' message
header field. One message may reference a list of messages which
precede it in the thread. The heuristic attempts to determine
relationships between messages assuming that the references are in order.
This relation has a lower confidence.
=item * C<'GUESS'>
The relation is a big guess, with low confidence. It may be based on
a subject which seems to be related, or commonalities in the message's
body.
=back
More constants may be added later.
example:
my $question = $answer->repliedTo;
my ($question, $quality) = $answer->repliedTo;
if($question && $quality eq 'REPLY') { ... };
=item $obj-E<gt>B<sortedFollowUps>([PREPARE [,COMPARE]])
Returns the list of L<followUps()|Mail::Box::Thread::Node/"The thread order">, but sorted. By default
sorting is based on the estimated time of the reply. See
startTimeEstimate().
=back
=head2 On the whole thread
Some convenience methods are added to threads, to simplify retrieving
information from it.
=over 4
=item $obj-E<gt>B<endTimeEstimate>()
Returns a guess as to when the thread has ended (although you never
know for sure whether there fill follow messages in the future).
=item $obj-E<gt>B<ids>()
Returns all the ids in the thread starting at the current thread node.
example:
$newfolder->addMessages($folder->ids($thread->ids));
$folder->delete($thread->ids);
=item $obj-E<gt>B<numberOfMessages>()
Number of messages in the thread starting at the current thread node, but
not counting the dummies.
=item $obj-E<gt>B<recurse>(CODE-REF)
Execute a function for all sub-threads. If the subroutine returns true,
sub-threads are visited recursively. Otherwise, the current branch
traversal is aborted. The routine is called with the thread-node as the
only argument.
=item $obj-E<gt>B<startTimeEstimate>()
Returns a guess as to when the thread was started. Each message contains
various date specifications (each with various uncertainties resulting
from timezones and out-of-sync clocks). One of these date specifications
is used as the timestamp for the message. If the node contains a dummy
message the lowest timestamp of the replies is returned. Otherwise the
estimated timestamp of the node's message is returned.
=item $obj-E<gt>B<threadMessages>()
Returns all the messages in the thread starting at the current thread
node. This list will not include dummies.
example:
my @t = $folder->message(3)
->threadStart
->threadMessages;
=item $obj-E<gt>B<threadToString>([CODE])
Translate a thread into a string. The string will contain at least one
line for each message which was found, but tries to fold dummies. This
is useful for debugging, but most message readers will prefer to
implement their own thread printer.
The optional CODE argument is a reference to a routine which will be called
for each message in the thread. The routine will be called with the
message as the first argument. The default shows the subject of the message.
In the first example below, this routine is called seven times.
example:
print $node->threadToString;
may result in
Subject of this message
|- Re: Subject of this message
|-*- Re: Re: Subject of this message
| |- Re(2) Subject of this message
| |- [3] Re(2) Subject of this message
| `- Re: Subject of this message (reply)
`- Re: Subject of this message
The `*' represents a missing message (a "dummy" message). The `[3]'
presents a folded thread with three messages.
print $node->threadToString(\&show);
sub show($) {
my $message = shift;
my $subject = $message->head->get('subject');
length $subject ? $subject : '<no subject>';
}
=item $obj-E<gt>B<totalSize>()
Returns the sum of the size of all the messages in the thread.
=back
=head2 Error handling
See L<documentation in the base class|Mail::Reporter/"Error handling">.
=over 4
=item $obj-E<gt>B<AUTOLOAD>()
See L<Mail::Reporter/"Error handling">
=item $obj-E<gt>B<addReport>(OBJECT)
See L<Mail::Reporter/"Error handling">
=item $obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
=item Mail::Box::Thread::Node-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
See L<Mail::Reporter/"Error handling">
=item $obj-E<gt>B<errors>()
See L<Mail::Reporter/"Error handling">
=item $obj-E<gt>B<log>([LEVEL [,STRINGS]])
=item Mail::Box::Thread::Node-E<gt>B<log>([LEVEL [,STRINGS]])
See L<Mail::Reporter/"Error handling">
=item $obj-E<gt>B<logPriority>(LEVEL)
=item Mail::Box::Thread::Node-E<gt>B<logPriority>(LEVEL)
See L<Mail::Reporter/"Error handling">
=item $obj-E<gt>B<logSettings>()
See L<Mail::Reporter/"Error handling">
=item $obj-E<gt>B<notImplemented>()
See L<Mail::Reporter/"Error handling">
=item $obj-E<gt>B<report>([LEVEL])
See L<Mail::Reporter/"Error handling">
=item $obj-E<gt>B<reportAll>([LEVEL])
See L<Mail::Reporter/"Error handling">
=item $obj-E<gt>B<trace>([LEVEL])
See L<Mail::Reporter/"Error handling">
=item $obj-E<gt>B<warnings>()
See L<Mail::Reporter/"Error handling">
=back
=head2 Cleanup
See L<documentation in the base class|Mail::Reporter/"Cleanup">.
=over 4
=item $obj-E<gt>B<DESTROY>()
See L<Mail::Reporter/"Cleanup">
=back
=head1 DIAGNOSTICS
=over 4
=item Error: Package $package does not implement $method.
Fatal error: the specific package (or one of its superclasses) does not
implement this method where it should. This message means that some other
related classes do implement this method however the class at hand does
not. Probably you should investigate this and probably inform the author
of the package.
=back
=head1 SEE ALSO
This module is part of Mail-Box distribution version 2.110,
built on January 05, 2014. Website: F<http://perl.overmeer.net/mailbox/>
=head1 LICENSE
Copyrights 2001-2014 by [Mark Overmeer]. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
See F<http://www.perl.com/perl/misc/Artistic.html>
|