| 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::Message::Head::Delayed;{ | ||||||||||||||||||||||||||||
| 13 | 14 | our $VERSION = '4.02'; | |||||||||||||||||||||||||||
| 14 | } | ||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | 14 | ▶ | use parent 'Mail::Message::Head'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||
| 18 | 14 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 19 | 14 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||
| 21 | 14 | ▶ | use Log::Report 'mail-box', import => [ qw/__x error/ ]; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||
| 23 | use Object::Realize::Later | ||||||||||||||||||||||||||||
| 24 | 14 | ▶ | becomes => 'Mail::Message::Head::Complete', | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 25 | realize => 'load', | ||||||||||||||||||||||||||||
| 26 | 14 | believe_caller => 1; | |||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||
| 28 | 14 | ▶ | use Scalar::Util qw/weaken/; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||
| 30 | #-------------------- | ||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||
| 32 | 0 | ▶ | sub build(@) { error __x"cannot build() a delayed header." } | ||||||||||||||||||||||||||
|
Subroutine
build: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||
| 34 | sub init($$) | ||||||||||||||||||||||||||||
| 35 | 737 | ▶ | { my ($self, $args) = @_; | ||||||||||||||||||||||||||
|
Subroutine
init: called CC=2 SCAR=7.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 36 | 737 | $self->SUPER::init($args); | |||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||
| 38 | 737 | ▶ | if(defined $args->{message}) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 39 | 0 | { $self->{MMHD_message} = $args->{message}; | |||||||||||||||||||||||||||
| 40 | 0 | weaken($self->{MMHD_message}); | |||||||||||||||||||||||||||
| 41 | } | ||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||
| 43 | 737 | $self; | |||||||||||||||||||||||||||
| 44 | } | ||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||
| 46 | sub modified(;$) | ||||||||||||||||||||||||||||
| 47 | 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]
| |||||||||||||||||||||||||||||
| 48 | 0 | $_[0]->forceRealize->modified(1); | |||||||||||||||||||||||||||
| 49 | } | ||||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||||
| 51 | sub isDelayed() { 1 } | ||||||||||||||||||||||||||||
| 52 | sub isModified() { 0 } | ||||||||||||||||||||||||||||
| 53 | sub isEmpty() { 0 } | ||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||
| 55 | #-------------------- | ||||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||
| 57 | 154 | ▶ | sub get($;$) { shift->load->get(@_) } | ||||||||||||||||||||||||||
|
Subroutine
get: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||
| 59 | #-------------------- | ||||||||||||||||||||||||||||
| 60 | |||||||||||||||||||||||||||||
| 61 | sub guessBodySize() { undef } | ||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||
| 63 | |||||||||||||||||||||||||||||
| 64 | sub guessTimestamp() { undef } | ||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||
| 66 | #-------------------- | ||||||||||||||||||||||||||||
| 67 | |||||||||||||||||||||||||||||
| 68 | sub read($) | ||||||||||||||||||||||||||||
| 69 | 0 | ▶ | { my ($self, $parser, $headtype, $bodytype) = @_; | ||||||||||||||||||||||||||
|
Subroutine
read: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 70 | |||||||||||||||||||||||||||||
| 71 | # $parser->skipHeader not implemented... returns where | ||||||||||||||||||||||||||||
| 72 | 0 | $self->{MMH_where} = 0; | |||||||||||||||||||||||||||
| 73 | 0 | $self; | |||||||||||||||||||||||||||
| 74 | } | ||||||||||||||||||||||||||||
| 75 | |||||||||||||||||||||||||||||
| 76 | 408 | ▶ | sub load() { $_[0] = $_[0]->message->loadHead } | ||||||||||||||||||||||||||
|
Subroutine
load: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 77 | |||||||||||||||||||||||||||||
| 78 | |||||||||||||||||||||||||||||
| 79 | 0 | ▶ | sub setNoRealize($) { error __x"attempt to set field on a delayed header." } | ||||||||||||||||||||||||||
|
Subroutine
setNoRealize: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 80 | |||||||||||||||||||||||||||||
| 81 | 14 | 1; | |||||||||||||||||||||||||||