| 1 | # This code is part of Perl distribution Mail-Box version 4.02. | ||||||||||
| 2 | # The POD got stripped from this file by OODoc version 3.06. | ||||||||||
| 3 | # For contributors see file ChangeLog. | ||||||||||
| 4 | |||||||||||
| 5 | # This software is copyright (c) 2001-2026 by Mark Overmeer. | ||||||||||
| 6 | |||||||||||
| 7 | # This is free software; you can redistribute it and/or modify it under | ||||||||||
| 8 | # the same terms as the Perl 5 programming language system itself. | ||||||||||
| 9 | # SPDX-License-Identifier: Artistic-1.0-Perl OR GPL-1.0-or-later | ||||||||||
| 10 | |||||||||||
| 11 | |||||||||||
| 12 | package Mail::Box::Net::Message;{ | ||||||||||
| 13 | 2 | our $VERSION = '4.02'; | |||||||||
| 14 | } | ||||||||||
| 15 | |||||||||||
| 16 | 2 | ▶ | use parent 'Mail::Box::Message'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 17 | |||||||||||
| 18 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 19 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 20 | |||||||||||
| 21 | 2 | ▶ | use Log::Report 'mail-box', import => [ qw/__x error trace/ ]; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 22 | |||||||||||
| 23 | #-------------------- | ||||||||||
| 24 | |||||||||||
| 25 | sub init($) | ||||||||||
| 26 | 0 | ▶ | { my ($self, $args) = @_; | ||||||||
|
Subroutine
init: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 27 | 0 | $self->SUPER::init($args); | |||||||||
| 28 | 0 | $self->unique($args->{unique}); | |||||||||
| 29 | 0 | $self; | |||||||||
| 30 | } | ||||||||||
| 31 | |||||||||||
| 32 | #-------------------- | ||||||||||
| 33 | |||||||||||
| 34 | sub unique(;$) | ||||||||||
| 35 | 0 | ▶ | { my $self = shift; | ||||||||
|
Subroutine
unique: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 36 | 0 | ▶ | @_ ? $self->{MBNM_unique} = shift : $self->{MBNM_unique}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 37 | } | ||||||||||
| 38 | |||||||||||
| 39 | #-------------------- | ||||||||||
| 40 | |||||||||||
| 41 | sub loadHead() | ||||||||||
| 42 | 0 | ▶ | { my $self = shift; | ||||||||
|
Subroutine
loadHead: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 43 | 0 | my $head = $self->head; | |||||||||
| 44 | 0 | ▶ | $head->isDelayed or return $head; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 45 | |||||||||||
| 46 | 0 | my $folder = $self->folder; | |||||||||
| 47 | |||||||||||
| 48 | 0 | $folder->lazyPermitted(1); | |||||||||
| 49 | 0 | $self->readFromParser($self->parser); | |||||||||
| 50 | 0 | $folder->lazyPermitted(0); | |||||||||
| 51 | |||||||||||
| 52 | 0 | trace "Loaded delayed head for message ". $self->messageId; | |||||||||
| 53 | 0 | $self->head; | |||||||||
| 54 | } | ||||||||||
| 55 | |||||||||||
| 56 | |||||||||||
| 57 | sub loadBody() | ||||||||||
| 58 | 0 | ▶ | { my $self = shift; | ||||||||
|
Subroutine
loadBody: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||
| 59 | 0 | my $msgid = $self->messageId; | |||||||||
| 60 | |||||||||||
| 61 | 0 | my $body = $self->body; | |||||||||
| 62 | 0 | ▶ | $body->isDelayed or return; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 63 | |||||||||||
| 64 | 0 | my $head = $self->head; | |||||||||
| 65 | 0 | my $parser = $self->parser; | |||||||||
| 66 | |||||||||||
| 67 | 0 | ▶ | if($head->isDelayed) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 68 | 0 | ▶ | { $head = $self->readHead($parser) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 69 | or error __x"unable to read delayed head for {msgid}.", msgid => $msgid; | ||||||||||
| 70 | |||||||||||
| 71 | 0 | trace "Loaded delayed head for $msgid."; | |||||||||
| 72 | 0 | $self->head($head); | |||||||||
| 73 | } | ||||||||||
| 74 | else | ||||||||||
| 75 | 0 | { my ($begin, $end) = $body->fileLocation; | |||||||||
| 76 | 0 | $parser->filePosition($begin); | |||||||||
| 77 | } | ||||||||||
| 78 | |||||||||||
| 79 | 0 | ▶ | my $newbody = $self->readBody($parser, $head) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 80 | or error __x"unable to read delayed body for {msgid}.", msgid => $msgid; | ||||||||||
| 81 | |||||||||||
| 82 | 0 | trace "Loaded delayed body for $msgid."; | |||||||||
| 83 | 0 | $self->storeBody($newbody->contentInfoFrom($head)); | |||||||||
| 84 | } | ||||||||||
| 85 | |||||||||||
| 86 | 2 | 1; | |||||||||