| 1 | # Copyrights 2001-2020 by [Mark Overmeer]. | ||||||||||||||||||||||||||||
| 2 | # For other contributors see ChangeLog. | ||||||||||||||||||||||||||||
| 3 | # See the manual pages for details on the licensing terms. | ||||||||||||||||||||||||||||
| 4 | # Pod stripped from pm file by OODoc 2.02. | ||||||||||||||||||||||||||||
| 5 | # This code is part of distribution Mail-Box. Meta-POD processed with | ||||||||||||||||||||||||||||
| 6 | # OODoc into POD and HTML manual-pages. See README.md | ||||||||||||||||||||||||||||
| 7 | # Copyright Mark Overmeer. Licensed under the same terms as Perl itself. | ||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | package Mail::Message::Head::Delayed; | ||||||||||||||||||||||||||||
| 10 | 12 | ▶ | use vars '$VERSION'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 11 | 12 | $VERSION = '3.009'; | |||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | 12 | ▶ | use base 'Mail::Message::Head'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||
| 15 | 12 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 16 | 12 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||
| 18 | use Object::Realize::Later | ||||||||||||||||||||||||||||
| 19 | 12 | becomes => 'Mail::Message::Head::Complete', | |||||||||||||||||||||||||||
| 20 | realize => 'load', | ||||||||||||||||||||||||||||
| 21 | 12 | ▶ | believe_caller => 1; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||
| 23 | 12 | ▶ | use Scalar::Util 'weaken'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||
| 26 | 0 | ▶ | sub build(@) {shift->log(ERROR => "Cannot build() a delayed header.") } | ||||||||||||||||||||||||||
|
Subroutine
build: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||
| 28 | #------------------------------------------ | ||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||
| 30 | sub init($$) | ||||||||||||||||||||||||||||
| 31 | 0 | ▶ | { my ($self, $args) = @_; | ||||||||||||||||||||||||||
|
Subroutine
init: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 32 | 0 | $self->SUPER::init($args); | |||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||
| 34 | 0 | ▶ | if(defined $args->{message}) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 35 | 0 | { $self->{MMHD_message} = $args->{message}; | |||||||||||||||||||||||||||
| 36 | 0 | weaken($self->{MMHD_message}); | |||||||||||||||||||||||||||
| 37 | } | ||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||
| 39 | 0 | $self; | |||||||||||||||||||||||||||
| 40 | } | ||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||
| 42 | #------------------------------------------ | ||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||
| 44 | sub isDelayed() {1} | ||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||
| 46 | #------------------------------------------ | ||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||
| 48 | sub modified(;$) | ||||||||||||||||||||||||||||
| 49 | 0 | ▶ | { return 0 if @_==1 || !$_[1]; | ||||||||||||||||||||||||||
|
Subroutine
modified: not called CC=3 SCAR=24.8
Pod
documented
Branch: 1 branch
Condition0%0/3
@_ == 1 or not $_[1]
MC/DC0%0/2
@_ == 1 or not $_[1]
@_ == 1
not $_[1]
Truth table0%0/3
A or not(B)
A= @_ == 1B= not $_[1]
| |||||||||||||||||||||||||||||
| 50 | 0 | shift->forceRealize->modified(1); | |||||||||||||||||||||||||||
| 51 | } | ||||||||||||||||||||||||||||
| 52 | |||||||||||||||||||||||||||||
| 53 | #------------------------------------------ | ||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||
| 55 | sub isModified() { 0 } | ||||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||
| 57 | #------------------------------------------ | ||||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||
| 59 | sub isEmpty() { 0 } | ||||||||||||||||||||||||||||
| 60 | |||||||||||||||||||||||||||||
| 61 | #------------------------------------------ | ||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||
| 63 | |||||||||||||||||||||||||||||
| 64 | sub get($;$) | ||||||||||||||||||||||||||||
| 65 | 0 | ▶ | { my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
get: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 66 | 0 | $self->load->get(@_); | |||||||||||||||||||||||||||
| 67 | } | ||||||||||||||||||||||||||||
| 68 | |||||||||||||||||||||||||||||
| 69 | #------------------------------------------ | ||||||||||||||||||||||||||||
| 70 | |||||||||||||||||||||||||||||
| 71 | |||||||||||||||||||||||||||||
| 72 | sub guessBodySize() {undef} | ||||||||||||||||||||||||||||
| 73 | |||||||||||||||||||||||||||||
| 74 | |||||||||||||||||||||||||||||
| 75 | sub guessTimestamp() {undef} | ||||||||||||||||||||||||||||
| 76 | |||||||||||||||||||||||||||||
| 77 | #------------------------------------------ | ||||||||||||||||||||||||||||
| 78 | |||||||||||||||||||||||||||||
| 79 | sub read($) | ||||||||||||||||||||||||||||
| 80 | 0 | ▶ | { my ($self, $parser, $headtype, $bodytype) = @_; | ||||||||||||||||||||||||||
|
Subroutine
read: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 81 | |||||||||||||||||||||||||||||
| 82 | # $parser->skipHeader not implemented... returns where | ||||||||||||||||||||||||||||
| 83 | 0 | $self->{MMH_where} = 0; | |||||||||||||||||||||||||||
| 84 | 0 | $self; | |||||||||||||||||||||||||||
| 85 | } | ||||||||||||||||||||||||||||
| 86 | |||||||||||||||||||||||||||||
| 87 | 0 | ▶ | sub load() {$_[0] = $_[0]->message->loadHead} | ||||||||||||||||||||||||||
|
Subroutine
load: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 88 | 0 | ▶ | sub setNoRealize($) { shift->log(INTERNAL => "Setting field on a delayed?") } | ||||||||||||||||||||||||||
|
Subroutine
setNoRealize: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 89 | |||||||||||||||||||||||||||||
| 90 | 12 | 1; | |||||||||||||||||||||||||||