{
    "content": [
        {
            "type": "text",
            "text": "# Mail::Box::Thread::Node (info)\n\n## NAME\n\nMail::Box::Thread::Node - one node in a message thread\n\n## SYNOPSIS\n\nmy $node = Mail::Box::Thread::Node->new;\n$node->addMessage($message);\n...\n\n## DESCRIPTION\n\nThe \"Mail::Box::Thread::Node\" maintains one node in the linked list of\nthreads.  Each node contains one message, and a list of its follow-ups.\nNext to that, it refers to its own ancestor and contains information\nabout the trustworthiness of that relationship.\n\n## Sections\n\n- **Mail::Box::Thread::NodUsermContributed Perl DocumeMail::Box::Thread::Node(3pm)**\n- **NAME**\n- **INHERITANCE**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **METHODS**\n- **DIAGNOSTICS**\n- **SEE ALSO**\n- **LICENSE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Mail::Box::Thread::Node",
        "section": "",
        "mode": "info",
        "summary": "Mail::Box::Thread::Node - one node in a message thread",
        "synopsis": "my $node = Mail::Box::Thread::Node->new;\n$node->addMessage($message);\n...",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "Mail::Box::Thread::NodUsermContributed Perl DocumeMail::Box::Thread::Node(3pm)",
                "lines": 1,
                "subsections": []
            },
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "INHERITANCE",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 286,
                "subsections": []
            },
            {
                "name": "DIAGNOSTICS",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "LICENSE",
                "lines": 7,
                "subsections": []
            }
        ],
        "sections": {
            "Mail::Box::Thread::NodUsermContributed Perl DocumeMail::Box::Thread::Node(3pm)": {
                "content": "",
                "subsections": []
            },
            "NAME": {
                "content": "Mail::Box::Thread::Node - one node in a message thread\n",
                "subsections": []
            },
            "INHERITANCE": {
                "content": "Mail::Box::Thread::Node\nis a Mail::Reporter\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "my $node = Mail::Box::Thread::Node->new;\n$node->addMessage($message);\n...\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The \"Mail::Box::Thread::Node\" maintains one node in the linked list of\nthreads.  Each node contains one message, and a list of its follow-ups.\nNext to that, it refers to its own ancestor and contains information\nabout the trustworthiness of that relationship.\n\nTo complicate things a little, because the thread-manager can maintain\nmultiple folders, and merge there content, you may find the same\nmessage in more folders.  All versions of the same message (based on\nmessage-id) are stored in the same node.\n\nExtends \"DESCRIPTION\" in Mail::Reporter.\n",
                "subsections": []
            },
            "METHODS": {
                "content": "Extends \"METHODS\" in Mail::Reporter.\n\nConstructors\nExtends \"Constructors\" in Mail::Reporter.\n\nMail::Box::Thread::Node->new(%options)\nYou will not call this method yourself. The\nMail::Box::Thread::Manager object will call it to construct\n\"Mail::Box::Thread::Node\" objects.  Either a \"message\" or a\n\"messageId\" must be supplied.\n\n-Option    --Defined in     --Default\ndummytype                   undef\nlog         Mail::Reporter   'WARNINGS'\nmessage                      undef\nmessageId                    undef\ntrace       Mail::Reporter   'WARNINGS'\n\ndummytype => CLASS\nIndicates the class name of dummy messages. Dummy messages are\nplaceholders in a Mail::Box::Thread::Manager data structure.\n\nlog => LEVEL\nmessage => MESSAGE\nThe MESSAGE which is stored in this node.  The message must be a\nMail::Box::Message.\n\nmessageId => MESSAGE-ID\nThe MESSAGE-ID for the message which is stored in this node.\nOnly specify it when you don't have the message yet.\n\ntrace => LEVEL\n\nThe thread node\n$obj->addMessage($message)\nAdd one message to the thread node.  If the node contains a dummy,\nthen the dummy is replaced. Otherwise, the messages is added to the\nend of the list.\n\n$obj->expand( [BOOLEAN] )\nReturns whether this (part of the) folder has to be shown expanded\nor not.  This is simply done by a label, which means that most\nfolder types can store this.\n\n$obj->isDummy()\nReturns true if the message is a dummy. A dummy is a \"hole\" in a\nthread which has follow-ups but does not have a message.\n\n$obj->message()\nGet the message which is stored in this thread node.  NOTE: the\nsame message may be located in many folders at the same time, and\nthese folders may be controlled by the same thread manager.\n\nIn scalar context, this method returns the first instance of the\nmessage that is not deleted. If all instances are flagged for\ndeletion, then you get the first deleted message. When the open\nfolders only contain references to the message, but no instance,\nyou get a dummy message (see Mail::Message::Dummy).\n\nIn list context, all instances of the message which have been found\nare returned.\n\nexample:\n\nmy $threads = $mgr->threads(folders => [$draft, $sent]);\nmy $node    = $draft->message(1)->thread;\n\nforeach my $instance ($node->message) {\nprint \"Found in \", $instance->folder, \".\\n\";\n}\n\nprint \"Subject is \", $node->message->subject, \".\\n\";\n\n$obj->messageId()\nReturn the message-id related to this thread node.  Each of the\nmessages listed in this node will have the same ID.\n\nThe thread order\n$obj->followUps()\nReturns the list of follow-ups to this thread node.  This list may\ncontain parsed, not-parsed, and dummy messages.\n\n$obj->followedBy($threads)\nRegister that the $threads are follow-ups to this message. These\nfollow-ups need not be related to each other in any way other than\nsharing the same parent.\n\nDefining the same relation more than once will not cause\ninformation to be duplicated.\n\n$obj->follows($thread, $quality)\nRegister that the current thread is a reply to the specified\n$thread. The $quality of the relation is specified by the second\nargument.  The method returns \"undef\" if the link is not accepted\nin order to avoid circular references.\n\nThe relation may be specified more than once, but only the most\nconfident relation is used. For example, if a reply ($quality\nequals \"REPLY\") is specified, later calls to the follow method will\nhave no effect. If \"follows\" is called with a $quality that matches\nthe current quality, the new thread overrides the previous.\n\n$obj->repliedTo()\nReturns the message(s) to which the message in this node replies.\nIn scalar context, this method will return the message to which the\nmessage in this node replies. This message object may be a dummy\nmessage.\n\nIf the message seems to be the first message of a thread, the value\n\"undef\" is returned.  (Remember that some MUA are not adding\nreference information to the message's header, so you can never be\nsure a message is the start of a thread)\n\nIn list context, this method returns a second string value\nindicating the confidence that the messages are related.  When\nextended thread discovery is enabled, then some heuristics are\napplied to determine if messages are related. Values for the STRING\nmay be:\n\no   'REPLY'\n\nThis relation was directly derived from an `in-reply-to'\nmessage header field. The relation has a high confidence.\n\no   'REFERENCE'\n\nThis relation is based on information found in a `Reference'\nmessage header field.  One message may reference a list of\nmessages which precede it in the thread. The heuristic attempts\nto determine relationships between messages assuming that the\nreferences are in order.  This relation has a lower confidence.\n\no   'GUESS'\n\nThe relation is a big guess, with low confidence.  It may be\nbased on a subject which seems to be related, or commonalities\nin the message's body.\n\nMore constants may be added later.\n\nexample:\n\nmy $question = $answer->repliedTo;\nmy ($question, $quality) = $answer->repliedTo;\nif($question && $quality eq 'REPLY') { ... };\n\n$obj->sortedFollowUps( [$prepare, [$compare]] )\nReturns the list of followUps(), but sorted.  By default sorting is\nbased on the estimated time of the reply. See startTimeEstimate().\n\nOn the whole thread\nSome convenience methods are added to threads, to simplify retrieving\ninformation from it.\n\n$obj->endTimeEstimate()\nReturns a guess as to when the thread has ended (although you never\nknow for sure whether there fill follow messages in the future).\n\n$obj->ids()\nReturns all the ids in the thread starting at the current thread\nnode.\n\nexample:\n\n$newfolder->addMessages($folder->ids($thread->ids));\n$folder->delete($thread->ids);\n\n$obj->numberOfMessages()\nNumber of messages in the thread starting at the current thread\nnode, but not counting the dummies.\n\n$obj->recurse(CODE)\nExecute a function for all sub-threads.  If the subroutine returns\ntrue, sub-threads are visited recursively. Otherwise, the current\nbranch traversal is aborted. The routine is called with the thread-\nnode as the only argument.\n\n$obj->startTimeEstimate()\nReturns a guess as to when the thread was started.  Each message\ncontains various date specifications (each with various\nuncertainties resulting from timezones and out-of-sync clocks). One\nof these date specifications is used as the timestamp for the\nmessage. If the node contains a dummy message the lowest timestamp\nof the replies is returned. Otherwise the estimated timestamp of\nthe node's message is returned.\n\n$obj->threadMessages()\nReturns all the messages in the thread starting at the current\nthread node.  This list will not include dummies.\n\nexample:\n\nmy @t = $folder->message(3)\n->threadStart\n->threadMessages;\n\n$obj->threadToString( [CODE] )\nTranslate a thread into a string. The string will contain at least\none line for each message which was found, but tries to fold\ndummies.  This is useful for debugging, but most message readers\nwill prefer to implement their own thread printer.\n\nThe optional CODE argument is a reference to a routine which will\nbe called for each message in the thread.  The routine will be\ncalled with the message as the first argument.  The default shows\nthe subject of the message.  In the first example below, this\nroutine is called seven times.\n\nexample:\n\nprint $node->threadToString;\n\nmay result in\n\nSubject of this message\n|- Re: Subject of this message\n|-*- Re: Re: Subject of this message\n| |- Re(2) Subject of this message\n| |- [3] Re(2) Subject of this message\n| `- Re: Subject of this message (reply)\n`- Re: Subject of this message\n\nThe `*' represents a missing message (a \"dummy\" message).  The\n`[3]' presents a folded thread with three messages.\n\nprint $node->threadToString(\\&show);\n\nsub show($) {\nmy $message = shift;\nmy $subject = $message->head->get('subject');\nlength $subject ? $subject : '<no subject>';\n}\n\n$obj->totalSize()\nReturns the sum of the size of all the messages in the thread.\n\nError handling\nExtends \"Error handling\" in Mail::Reporter.\n\n$obj->AUTOLOAD()\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->addReport($object)\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->defaultTrace( [$level]|[$loglevel, $tracelevel]|[$level,\n$callback] )\nMail::Box::Thread::Node->defaultTrace( [$level]|[$loglevel,\n$tracelevel]|[$level, $callback] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->errors()\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->log( [$level, [$strings]] )\nMail::Box::Thread::Node->log( [$level, [$strings]] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->logPriority($level)\nMail::Box::Thread::Node->logPriority($level)\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->logSettings()\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->notImplemented()\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->report( [$level] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->reportAll( [$level] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->trace( [$level] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->warnings()\nInherited, see \"Error handling\" in Mail::Reporter\n\nCleanup\nExtends \"Cleanup\" in Mail::Reporter.\n\n$obj->DESTROY()\nInherited, see \"Cleanup\" in Mail::Reporter\n",
                "subsections": []
            },
            "DIAGNOSTICS": {
                "content": "Error: Package $package does not implement $method.\nFatal error: the specific package (or one of its superclasses) does\nnot implement this method where it should. This message means that\nsome other related classes do implement this method however the\nclass at hand does not.  Probably you should investigate this and\nprobably inform the author of the package.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "This module is part of Mail-Box distribution version 3.009, built on\nAugust 18, 2020. Website: http://perl.overmeer.net/CPAN/\n",
                "subsections": []
            },
            "LICENSE": {
                "content": "Copyrights 2001-2020 by [Mark Overmeer]. For other contributors see\nChangeLog.\n\nThis program is free software; you can redistribute it and/or modify it\nunder the same terms as Perl itself.  See http://dev.perl.org/licenses/\n\nperl v5.30.3                      2020-08-20      Mail::Box::Thread::Node(3pm)",
                "subsections": []
            }
        }
    }
}