See METHODS in Mail::Reporter
You cannot instantiate a destructed message object. Destruction is done by calling Mail::Box::Message::destruct().
Option | Defined in | Default |
---|---|---|
body | Mail::Message | undef |
body_type | Mail::Box::Message | <from folder> |
deleted | Mail::Message | <false> |
field_type | Mail::Message | undef |
folder | Mail::Box::Message | <required> |
head | Mail::Message | undef |
head_type | Mail::Message | |
labels | Mail::Message | {} |
log | Mail::Reporter |
|
messageId | Mail::Message | undef |
modified | Mail::Message | <false> |
size | Mail::Box::Message | undef |
trace | Mail::Reporter |
|
trusted | Mail::Message | <false> |
You cannot instantiate a destructed message object directly. Destruction is done by calling Mail::Box::Message::destruct() on any existing folder message.
When undef
is specified for HEAD, no change has to take place and
the method returns silently. In all other cases, this method will
complain that the header has been removed.
The message originated from a folder, but its memory has been freed-up forcefully by means of Mail::Box::Message::destruct(). Apparently, your program still tries to get to the header or body data after this destruction, which is not possible.
When undef
is specified for BODY, no change has to take place and
the method returns silently. In all other cases, this method will
complain that the body data has been removed.
It is possible to delete a destructed message, but not to undelete it.
Once a message is destructed, it can not be revived. Destruction is an optimization in memory usage: if you need an undelete functionality, then you can not use Mail::Box::Message::destruct().
Coerce a Mail::Box::Message into destruction.
Mail::Box::Message::Destructed->coerce($folder->message(1)); $folder->message(1)->destruct; # same my $msg = $folder->message(1); Mail::Box::Message::Destructed->coerce($msg); $msg->destruct; # same
Only real Mail::Box::Message objects can get destructed into Mail::Box::Message::Destructed objects. Mail::Message free their memory immediately when the last reference is lost.