| 1 | # Copyrights 2001-2022 by [Mark Overmeer <markov@cpan.org>]. | ||||||||||||||||||||||||||||||||||||||
| 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.03. | ||||||||||||||||||||||||||||||||||||||
| 5 | # This code is part of distribution Mail-Message. 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::Replace::MailInternet; | ||||||||||||||||||||||||||||||||||||||
| 10 | 1 | ▶ | use vars '$VERSION'; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||
| 11 | 1 | $VERSION = '3.012'; | |||||||||||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||||||||||||
| 13 | 1 | ▶ | use base 'Mail::Message'; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||||||||||||
| 15 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||
| 16 | 1 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||||||||||||
| 18 | 1 | ▶ | use Mail::Box::FastScalar; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||
| 19 | 1 | ▶ | use Mail::Box::Parser::Perl; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||
| 20 | 1 | ▶ | use Mail::Message::Body::Lines; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||||||||||||
| 22 | 1 | ▶ | use File::Spec; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||||||||||||
| 25 | sub new(@) | ||||||||||||||||||||||||||||||||||||||
| 26 | 0 | ▶ | { my $class = shift; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
new: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 27 | 0 | ▶ | my $data = @_ % 2 ? shift : undef; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 28 | 0 | ▶ | $class = __PACKAGE__ if $class eq 'Mail::Internet'; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 29 | 0 | $class->SUPER::new(@_, raw_data => $data); | |||||||||||||||||||||||||||||||||||||
| 30 | } | ||||||||||||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||||||||||||
| 32 | sub init($) | ||||||||||||||||||||||||||||||||||||||
| 33 | 0 | ▶ | { my ($self, $args) = @_; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
init: not called CC=8 SCAR=42.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||
| 34 | 0 | ▶ | $args->{head_type} ||= 'Mail::Message::Replace::MailHeader'; | ||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
$args->{"head_type"} ||= "Mail::Message::Replace::MailHeader"
MC/DC0%0/1
$args->{"head_type"} ||= "Mail::Message::Replace::MailHeader"
$args->{"head_type"}
Truth table0%0/2
A
A= $args->{"head_type"}
| |||||||||||||||||||||||||||||||||||||||
| 35 | 0 | ▶ | $args->{head} ||= $args->{Header}; | ||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$args->{"head"} ||= $args->{"Header"}
MC/DC0%0/2
$args->{"head"} ||= $args->{"Header"}
$args->{"head"}
$args->{"Header"}
Truth table0%0/3
A ||= B
A= $args->{"head"}B= $args->{"Header"}
| |||||||||||||||||||||||||||||||||||||||
| 36 | 0 | ▶ | $args->{body} ||= $args->{Body}; | ||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$args->{"body"} ||= $args->{"Body"}
MC/DC0%0/2
$args->{"body"} ||= $args->{"Body"}
$args->{"body"}
$args->{"Body"}
Truth table0%0/3
A ||= B
A= $args->{"body"}B= $args->{"Body"}
| |||||||||||||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||||||||||||
| 38 | 0 | ▶ | defined $self->SUPER::init($args) or return; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||||||||||||
| 40 | 0 | ▶ | $self->{MI_wrap} = $args->{FoldLength} || 79; | ||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
$args->{'FoldLength'} || 79
MC/DC0%0/1
$args->{'FoldLength'} || 79
$args->{'FoldLength'}
Truth table0%0/2
A
A= $args->{'FoldLength'}
| |||||||||||||||||||||||||||||||||||||||
| 41 | 0 | $self->{MI_mail_from} = $args->{MailFrom}; | |||||||||||||||||||||||||||||||||||||
| 42 | 0 | ▶ | $self->{MI_modify} = exists $args->{Modify} ? $args->{Modify} : 1; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||||||||||||
| 44 | $self->processRawData($self->{raw_data}, !defined $args->{Header} | ||||||||||||||||||||||||||||||||||||||
| 45 | 0 | ▶ | , !defined $args->{Body}) if defined $self->{raw_data}; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||||||||||||
| 47 | 0 | $self; | |||||||||||||||||||||||||||||||||||||
| 48 | } | ||||||||||||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||||||||||||
| 50 | sub processRawData($$$) | ||||||||||||||||||||||||||||||||||||||
| 51 | 0 | ▶ | { my ($self, $data, $get_head, $get_body) = @_; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
processRawData: not called CC=12 SCAR=50.5
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||
| 52 | 0 | ▶ | return $self unless $get_head || $get_body; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$get_head or $get_body
MC/DC0%0/2
$get_head or $get_body
$get_head
$get_body
Truth table0%0/3
A or B
A= $get_headB= $get_body
| |||||||||||||||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||||||||||||
| 54 | 0 | my ($filename, $lines); | |||||||||||||||||||||||||||||||||||||
| 55 | 0 | ▶ | if(ref $data eq 'ARRAY') | ||||||||||||||||||||||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||||||||||||||||||||||
| 56 | 0 | { $filename = 'array of lines'; | |||||||||||||||||||||||||||||||||||||
| 57 | 0 | $lines = $data; | |||||||||||||||||||||||||||||||||||||
| 58 | } | ||||||||||||||||||||||||||||||||||||||
| 59 | elsif(ref $data eq 'GLOB') | ||||||||||||||||||||||||||||||||||||||
| 60 | 0 | { $filename = 'file (GLOB)'; | |||||||||||||||||||||||||||||||||||||
| 61 | 0 | $lines = [ <$data> ]; | |||||||||||||||||||||||||||||||||||||
| 62 | } | ||||||||||||||||||||||||||||||||||||||
| 63 | ▶ | elsif(ref $data && $data->isa('IO::Handle')) | |||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
ref $data and $data->isa("IO::Handle")
MC/DC0%0/2
ref $data and $data->isa("IO::Handle")
ref $data
$data->isa("IO::Handle")
Truth table0%0/3
A and B
A= ref $dataB= $data->isa("IO::Handle")
| |||||||||||||||||||||||||||||||||||||||
| 64 | 0 | { $filename = 'file ('.ref($data).')'; | |||||||||||||||||||||||||||||||||||||
| 65 | 0 | $lines = [ $data->getlines ]; | |||||||||||||||||||||||||||||||||||||
| 66 | } | ||||||||||||||||||||||||||||||||||||||
| 67 | else | ||||||||||||||||||||||||||||||||||||||
| 68 | 0 | { $self->log(ERROR=> "Mail::Internet does not support this kind of data"); | |||||||||||||||||||||||||||||||||||||
| 69 | 0 | return undef; | |||||||||||||||||||||||||||||||||||||
| 70 | } | ||||||||||||||||||||||||||||||||||||||
| 71 | |||||||||||||||||||||||||||||||||||||||
| 72 | 0 | ▶ | return unless @$lines; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 73 | |||||||||||||||||||||||||||||||||||||||
| 74 | 0 | my $buffer = join '', @$lines; | |||||||||||||||||||||||||||||||||||||
| 75 | 0 | my $file = Mail::Box::FastScalar->new(\$buffer); | |||||||||||||||||||||||||||||||||||||
| 76 | |||||||||||||||||||||||||||||||||||||||
| 77 | 0 | my $parser = Mail::Box::Parser::Perl->new | |||||||||||||||||||||||||||||||||||||
| 78 | ( filename => $filename | ||||||||||||||||||||||||||||||||||||||
| 79 | , file => $file | ||||||||||||||||||||||||||||||||||||||
| 80 | , trusted => 1 | ||||||||||||||||||||||||||||||||||||||
| 81 | ); | ||||||||||||||||||||||||||||||||||||||
| 82 | |||||||||||||||||||||||||||||||||||||||
| 83 | 0 | my $head; | |||||||||||||||||||||||||||||||||||||
| 84 | 0 | ▶ | if($get_head) | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 85 | 0 | ▶ | { my $from = substr($lines->[0], 0, 5) eq 'From ' ? shift @$lines : undef; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 86 | |||||||||||||||||||||||||||||||||||||||
| 87 | my $head = $self->{MM_head_type}->new | ||||||||||||||||||||||||||||||||||||||
| 88 | ( MailFrom => $self->{MI_mail_from} | ||||||||||||||||||||||||||||||||||||||
| 89 | , Modify => $self->{MI_modify} | ||||||||||||||||||||||||||||||||||||||
| 90 | , FoldLength => $self->{MI_wrap} | ||||||||||||||||||||||||||||||||||||||
| 91 | 0 | ); | |||||||||||||||||||||||||||||||||||||
| 92 | 0 | $head->read($parser); | |||||||||||||||||||||||||||||||||||||
| 93 | 0 | ▶ | $head->mail_from($from) if defined $from; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 94 | 0 | $self->head($head); | |||||||||||||||||||||||||||||||||||||
| 95 | } | ||||||||||||||||||||||||||||||||||||||
| 96 | else | ||||||||||||||||||||||||||||||||||||||
| 97 | 0 | { $head = $self->head; | |||||||||||||||||||||||||||||||||||||
| 98 | } | ||||||||||||||||||||||||||||||||||||||
| 99 | |||||||||||||||||||||||||||||||||||||||
| 100 | 0 | ▶ | $self->storeBody($self->readBody($parser, $head)) if $get_body; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 101 | 0 | $self->addReport($parser); | |||||||||||||||||||||||||||||||||||||
| 102 | 0 | $parser->stop; | |||||||||||||||||||||||||||||||||||||
| 103 | 0 | $self; | |||||||||||||||||||||||||||||||||||||
| 104 | } | ||||||||||||||||||||||||||||||||||||||
| 105 | |||||||||||||||||||||||||||||||||||||||
| 106 | |||||||||||||||||||||||||||||||||||||||
| 107 | sub dup() | ||||||||||||||||||||||||||||||||||||||
| 108 | 0 | ▶ | { my $self = shift; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
dup: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 109 | 0 | ref($self)->coerce($self->clone); | |||||||||||||||||||||||||||||||||||||
| 110 | } | ||||||||||||||||||||||||||||||||||||||
| 111 | |||||||||||||||||||||||||||||||||||||||
| 112 | |||||||||||||||||||||||||||||||||||||||
| 113 | 0 | ▶ | sub empty() { shift->DESTROY } | ||||||||||||||||||||||||||||||||||||
|
Subroutine
empty: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 114 | |||||||||||||||||||||||||||||||||||||||
| 115 | #-------------------------- | ||||||||||||||||||||||||||||||||||||||
| 116 | |||||||||||||||||||||||||||||||||||||||
| 117 | |||||||||||||||||||||||||||||||||||||||
| 118 | sub MailFrom(;$) | ||||||||||||||||||||||||||||||||||||||
| 119 | 0 | ▶ | { my $self = shift; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
MailFrom: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 120 | 0 | ▶ | @_ ? ($self->{MI_mail_from} = shift) : $self->{MU_mail_from}; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 121 | } | ||||||||||||||||||||||||||||||||||||||
| 122 | |||||||||||||||||||||||||||||||||||||||
| 123 | #-------------------------- | ||||||||||||||||||||||||||||||||||||||
| 124 | |||||||||||||||||||||||||||||||||||||||
| 125 | |||||||||||||||||||||||||||||||||||||||
| 126 | sub read($@) | ||||||||||||||||||||||||||||||||||||||
| 127 | 0 | ▶ | { my $thing = shift; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
read: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 128 | |||||||||||||||||||||||||||||||||||||||
| 129 | 0 | ▶ | return $thing->SUPER::read(@_) # Mail::Message behavior | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 130 | unless ref $thing; | ||||||||||||||||||||||||||||||||||||||
| 131 | |||||||||||||||||||||||||||||||||||||||
| 132 | # Mail::Header emulation | ||||||||||||||||||||||||||||||||||||||
| 133 | 0 | my $data = shift; | |||||||||||||||||||||||||||||||||||||
| 134 | 0 | $thing->processRawData($data, 1, 1); | |||||||||||||||||||||||||||||||||||||
| 135 | } | ||||||||||||||||||||||||||||||||||||||
| 136 | |||||||||||||||||||||||||||||||||||||||
| 137 | |||||||||||||||||||||||||||||||||||||||
| 138 | sub read_body($) | ||||||||||||||||||||||||||||||||||||||
| 139 | 0 | ▶ | { my ($self, $data) = @_; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
read_body: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 140 | 0 | $self->processRawData($data, 0, 1); | |||||||||||||||||||||||||||||||||||||
| 141 | } | ||||||||||||||||||||||||||||||||||||||
| 142 | |||||||||||||||||||||||||||||||||||||||
| 143 | |||||||||||||||||||||||||||||||||||||||
| 144 | sub read_header($) | ||||||||||||||||||||||||||||||||||||||
| 145 | 0 | ▶ | { my ($self, $data) = @_; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
read_header: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 146 | 0 | $self->processRawData($data, 1, 0); | |||||||||||||||||||||||||||||||||||||
| 147 | } | ||||||||||||||||||||||||||||||||||||||
| 148 | |||||||||||||||||||||||||||||||||||||||
| 149 | |||||||||||||||||||||||||||||||||||||||
| 150 | sub extract($) | ||||||||||||||||||||||||||||||||||||||
| 151 | 0 | ▶ | { my ($self, $data) = @_; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
extract: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 152 | 0 | $self->processRawData($data, 1, 1); | |||||||||||||||||||||||||||||||||||||
| 153 | } | ||||||||||||||||||||||||||||||||||||||
| 154 | |||||||||||||||||||||||||||||||||||||||
| 155 | |||||||||||||||||||||||||||||||||||||||
| 156 | sub reply(@) | ||||||||||||||||||||||||||||||||||||||
| 157 | 0 | ▶ | { my ($self, %args) = @_; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
reply: not called CC=11 SCAR=48.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 158 | |||||||||||||||||||||||||||||||||||||||
| 159 | 0 | my $reply_head = $self->{MM_head_type}->new; | |||||||||||||||||||||||||||||||||||||
| 160 | 0 | ▶ | my $home = $ENV{HOME} || File::Spec->curdir; | ||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$ENV{'HOME'} || 'File::Spec'->curdir
MC/DC0%0/2
$ENV{'HOME'} || 'File::Spec'->curdir
$ENV{'HOME'}
'File::Spec'->curdir
Truth table0%0/3
A || B
A= $ENV{'HOME'}B= 'File::Spec'->curdir
| |||||||||||||||||||||||||||||||||||||||
| 161 | 0 | my $headtemp = File::Spec->catfile($home, '.mailhdr'); | |||||||||||||||||||||||||||||||||||||
| 162 | |||||||||||||||||||||||||||||||||||||||
| 163 | 0 | ▶ | if(open HEAD, '<:raw', $headtemp) | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 164 | 0 | { my $parser = Mail::Box::Parser::Perl->new | |||||||||||||||||||||||||||||||||||||
| 165 | ( filename => $headtemp | ||||||||||||||||||||||||||||||||||||||
| 166 | , file => \*HEAD | ||||||||||||||||||||||||||||||||||||||
| 167 | , trusted => 1 | ||||||||||||||||||||||||||||||||||||||
| 168 | ); | ||||||||||||||||||||||||||||||||||||||
| 169 | 0 | $reply_head->read($parser); | |||||||||||||||||||||||||||||||||||||
| 170 | 0 | $parser->close; | |||||||||||||||||||||||||||||||||||||
| 171 | } | ||||||||||||||||||||||||||||||||||||||
| 172 | |||||||||||||||||||||||||||||||||||||||
| 173 | 0 | ▶ | $args{quote} ||= delete $args{Inline} || '>'; | ||||||||||||||||||||||||||||||||||||
|
Condition0%0/5
$args{"quote"} ||= delete $args{"Inline"} || ">"
delete $args{'Inline'} || '>'
MC/DC0%0/2
$args{"quote"} ||= delete $args{"Inline"} || ">"
$args{"quote"}
delete $args{'Inline'}
Truth table0%0/3
A ||= B
A= $args{"quote"}B= delete $args{'Inline'}
| |||||||||||||||||||||||||||||||||||||||
| 174 | 0 | ▶ | $args{group_reply} ||= delete $args{ReplyAll} || 0; | ||||||||||||||||||||||||||||||||||||
|
Condition0%0/5
$args{"group_reply"} ||= delete $args{"ReplyAll"} || 0
delete $args{'ReplyAll'} || 0
MC/DC0%0/2
$args{"group_reply"} ||= delete $args{"ReplyAll"} || 0
$args{"group_reply"}
delete $args{'ReplyAll'}
Truth table0%0/3
A ||= B
A= $args{"group_reply"}B= delete $args{'ReplyAll'}
| |||||||||||||||||||||||||||||||||||||||
| 175 | 0 | ▶ | my $keep = delete $args{Keep} || []; | ||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
delete $args{'Keep'} || []
MC/DC0%0/1
delete $args{'Keep'} || []
delete $args{'Keep'}
Truth table0%0/2
A
A= delete $args{'Keep'}
| |||||||||||||||||||||||||||||||||||||||
| 176 | 0 | ▶ | my $exclude = delete $args{Exclude} || []; | ||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
delete $args{'Exclude'} || []
MC/DC0%0/1
delete $args{'Exclude'} || []
delete $args{'Exclude'}
Truth table0%0/2
A
A= delete $args{'Exclude'}
| |||||||||||||||||||||||||||||||||||||||
| 177 | |||||||||||||||||||||||||||||||||||||||
| 178 | 0 | my $reply = $self->SUPER::reply(%args); | |||||||||||||||||||||||||||||||||||||
| 179 | |||||||||||||||||||||||||||||||||||||||
| 180 | 0 | my $head = $self->head; | |||||||||||||||||||||||||||||||||||||
| 181 | |||||||||||||||||||||||||||||||||||||||
| 182 | $reply_head->add($_->clone) | ||||||||||||||||||||||||||||||||||||||
| 183 | 0 | foreach map { $head->get($_) } @$keep; | |||||||||||||||||||||||||||||||||||||
| 184 | |||||||||||||||||||||||||||||||||||||||
| 185 | 0 | $reply_head->reset($_) foreach @$exclude; | |||||||||||||||||||||||||||||||||||||
| 186 | |||||||||||||||||||||||||||||||||||||||
| 187 | 0 | ref($self)->coerce($reply); | |||||||||||||||||||||||||||||||||||||
| 188 | } | ||||||||||||||||||||||||||||||||||||||
| 189 | |||||||||||||||||||||||||||||||||||||||
| 190 | |||||||||||||||||||||||||||||||||||||||
| 191 | sub add_signature(;$) | ||||||||||||||||||||||||||||||||||||||
| 192 | 0 | ▶ | { my $self = shift; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
add_signature: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 193 | my $filename = shift | ||||||||||||||||||||||||||||||||||||||
| 194 | 0 | ▶ | || File::Spec->catfile($ENV{HOME} || File::Spec->curdir, '.signature'); | ||||||||||||||||||||||||||||||||||||
|
Condition0%0/6
shift() || 'File::Spec'->catfile($ENV{'HOME'} || 'File::Spec'->curdir, '.signature')
$ENV{'HOME'} || 'File::Spec'->curdir
MC/DC0%0/2
shift() || 'File::Spec'->catfile($ENV{'HOME'} || 'File::Spec'->curdir, '.signature')
shift()
'File::Spec'->catfile($ENV{'HOME'} || 'File::Spec'->curdir, '.signature')
MC/DC0%0/2
$ENV{'HOME'} || 'File::Spec'->curdir
$ENV{'HOME'}
'File::Spec'->curdir
Truth table0%0/3
A || B
A= shift()B= 'File::Spec'->catfile($ENV{'HOME'} || 'File::Spec'->curdir, '.signature')
Truth table0%0/3
A || B
A= $ENV{'HOME'}B= 'File::Spec'->curdir
| |||||||||||||||||||||||||||||||||||||||
| 195 | 0 | $self->sign(File => $filename); | |||||||||||||||||||||||||||||||||||||
| 196 | } | ||||||||||||||||||||||||||||||||||||||
| 197 | |||||||||||||||||||||||||||||||||||||||
| 198 | |||||||||||||||||||||||||||||||||||||||
| 199 | sub sign(@) | ||||||||||||||||||||||||||||||||||||||
| 200 | 0 | ▶ | { my ($self, $args) = @_; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
sign: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 201 | 0 | my $sig; | |||||||||||||||||||||||||||||||||||||
| 202 | |||||||||||||||||||||||||||||||||||||||
| 203 | 0 | ▶ | if(my $filename = delete $self->{File}) | ||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||
| 204 | 0 | { $sig = Mail::Message::Body->new(file => $filename); | |||||||||||||||||||||||||||||||||||||
| 205 | } | ||||||||||||||||||||||||||||||||||||||
| 206 | elsif(my $sig = delete $self->{Signature}) | ||||||||||||||||||||||||||||||||||||||
| 207 | 0 | { $sig = Mail::Message::Body->new(data => $sig); | |||||||||||||||||||||||||||||||||||||
| 208 | } | ||||||||||||||||||||||||||||||||||||||
| 209 | |||||||||||||||||||||||||||||||||||||||
| 210 | 0 | ▶ | return unless defined $sig; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 211 | |||||||||||||||||||||||||||||||||||||||
| 212 | 0 | my $body = $self->decoded->stripSignature; | |||||||||||||||||||||||||||||||||||||
| 213 | 0 | my $set = $body->concatenate($body, "-- \n", $sig); | |||||||||||||||||||||||||||||||||||||
| 214 | 0 | ▶ | $self->body($set) if defined $set; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 215 | 0 | $set; | |||||||||||||||||||||||||||||||||||||
| 216 | } | ||||||||||||||||||||||||||||||||||||||
| 217 | |||||||||||||||||||||||||||||||||||||||
| 218 | |||||||||||||||||||||||||||||||||||||||
| 219 | sub send($@) | ||||||||||||||||||||||||||||||||||||||
| 220 | 0 | ▶ | { my ($self, $type, %args) = @_; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
send: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 221 | 0 | $self->send(via => $type); | |||||||||||||||||||||||||||||||||||||
| 222 | } | ||||||||||||||||||||||||||||||||||||||
| 223 | |||||||||||||||||||||||||||||||||||||||
| 224 | |||||||||||||||||||||||||||||||||||||||
| 225 | sub nntppost(@) | ||||||||||||||||||||||||||||||||||||||
| 226 | 0 | ▶ | { my ($self, %args) = @_; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
nntppost: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 227 | 0 | ▶ | $args{port} ||= delete $args{Port}; | ||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$args{"port"} ||= delete $args{"Port"}
MC/DC0%0/2
$args{"port"} ||= delete $args{"Port"}
$args{"port"}
delete $args{"Port"}
Truth table0%0/3
A ||= B
A= $args{"port"}B= delete $args{"Port"}
| |||||||||||||||||||||||||||||||||||||||
| 228 | 0 | ▶ | $args{nntp_debug} ||= delete $args{Debug}; | ||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$args{"nntp_debug"} ||= delete $args{"Debug"}
MC/DC0%0/2
$args{"nntp_debug"} ||= delete $args{"Debug"}
$args{"nntp_debug"}
delete $args{"Debug"}
Truth table0%0/3
A ||= B
A= $args{"nntp_debug"}B= delete $args{"Debug"}
| |||||||||||||||||||||||||||||||||||||||
| 229 | |||||||||||||||||||||||||||||||||||||||
| 230 | 0 | $self->send(via => 'nntp', %args); | |||||||||||||||||||||||||||||||||||||
| 231 | } | ||||||||||||||||||||||||||||||||||||||
| 232 | |||||||||||||||||||||||||||||||||||||||
| 233 | |||||||||||||||||||||||||||||||||||||||
| 234 | |||||||||||||||||||||||||||||||||||||||
| 235 | sub head(;$) | ||||||||||||||||||||||||||||||||||||||
| 236 | 0 | ▶ | { my $self = shift; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
head: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 237 | 0 | ▶ | return $self->SUPER::head(@_) if @_; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 238 | 0 | ▶ | $self->SUPER::head || $self->{MM_head_type}->new(message => $self); | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 239 | } | ||||||||||||||||||||||||||||||||||||||
| 240 | |||||||||||||||||||||||||||||||||||||||
| 241 | |||||||||||||||||||||||||||||||||||||||
| 242 | 0 | ▶ | sub header(;$) { shift->head->header(@_) } | ||||||||||||||||||||||||||||||||||||
|
Subroutine
header: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 243 | |||||||||||||||||||||||||||||||||||||||
| 244 | |||||||||||||||||||||||||||||||||||||||
| 245 | 0 | ▶ | sub fold(;$) { shift->head->fold(@_) } | ||||||||||||||||||||||||||||||||||||
|
Subroutine
fold: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 246 | |||||||||||||||||||||||||||||||||||||||
| 247 | |||||||||||||||||||||||||||||||||||||||
| 248 | 0 | ▶ | sub fold_length(;$$) { shift->head->fold_length(@_) } | ||||||||||||||||||||||||||||||||||||
|
Subroutine
fold_length: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 249 | |||||||||||||||||||||||||||||||||||||||
| 250 | |||||||||||||||||||||||||||||||||||||||
| 251 | 0 | ▶ | sub combine($;$) { shift->head->combine(@_) } | ||||||||||||||||||||||||||||||||||||
|
Subroutine
combine: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 252 | |||||||||||||||||||||||||||||||||||||||
| 253 | |||||||||||||||||||||||||||||||||||||||
| 254 | 0 | ▶ | sub print_header(@) { shift->head->print(@_) } | ||||||||||||||||||||||||||||||||||||
|
Subroutine
print_header: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 255 | |||||||||||||||||||||||||||||||||||||||
| 256 | |||||||||||||||||||||||||||||||||||||||
| 257 | 0 | ▶ | sub clean_header() { shift->header } | ||||||||||||||||||||||||||||||||||||
|
Subroutine
clean_header: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 258 | |||||||||||||||||||||||||||||||||||||||
| 259 | |||||||||||||||||||||||||||||||||||||||
| 260 | ▶ | sub tidy_headers() { } | |||||||||||||||||||||||||||||||||||||
|
Subroutine
tidy_headers: not called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 261 | |||||||||||||||||||||||||||||||||||||||
| 262 | |||||||||||||||||||||||||||||||||||||||
| 263 | 0 | ▶ | sub add(@) { shift->head->add(@_) } | ||||||||||||||||||||||||||||||||||||
|
Subroutine
add: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 264 | |||||||||||||||||||||||||||||||||||||||
| 265 | |||||||||||||||||||||||||||||||||||||||
| 266 | 0 | ▶ | sub replace(@) { shift->head->replace(@_) } | ||||||||||||||||||||||||||||||||||||
|
Subroutine
replace: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 267 | |||||||||||||||||||||||||||||||||||||||
| 268 | |||||||||||||||||||||||||||||||||||||||
| 269 | 0 | ▶ | sub get(@) { shift->head->get(@_) } | ||||||||||||||||||||||||||||||||||||
|
Subroutine
get: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 270 | |||||||||||||||||||||||||||||||||||||||
| 271 | |||||||||||||||||||||||||||||||||||||||
| 272 | sub delete(@) | ||||||||||||||||||||||||||||||||||||||
| 273 | 0 | ▶ | { my $self = shift; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
delete: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 274 | 0 | ▶ | @_ ? $self->head->delete(@_) : $self->SUPER::delete; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 275 | } | ||||||||||||||||||||||||||||||||||||||
| 276 | |||||||||||||||||||||||||||||||||||||||
| 277 | #------------ | ||||||||||||||||||||||||||||||||||||||
| 278 | |||||||||||||||||||||||||||||||||||||||
| 279 | |||||||||||||||||||||||||||||||||||||||
| 280 | sub body(@) | ||||||||||||||||||||||||||||||||||||||
| 281 | 0 | ▶ | { my $self = shift; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
body: not called CC=4 SCAR=30.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 282 | |||||||||||||||||||||||||||||||||||||||
| 283 | 0 | ▶ | unless(@_) | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 284 | 0 | { my $body = $self->body; | |||||||||||||||||||||||||||||||||||||
| 285 | 0 | ▶ | return defined $body ? scalar($body->lines) : []; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 286 | } | ||||||||||||||||||||||||||||||||||||||
| 287 | |||||||||||||||||||||||||||||||||||||||
| 288 | 0 | ▶ | my $data = ref $_[0] eq 'ARRAY' ? shift : \@_; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 289 | 0 | my $body = Mail::Message::Body::Lines->new(data => $data); | |||||||||||||||||||||||||||||||||||||
| 290 | 0 | $self->body($body); | |||||||||||||||||||||||||||||||||||||
| 291 | |||||||||||||||||||||||||||||||||||||||
| 292 | 0 | $body; | |||||||||||||||||||||||||||||||||||||
| 293 | } | ||||||||||||||||||||||||||||||||||||||
| 294 | |||||||||||||||||||||||||||||||||||||||
| 295 | |||||||||||||||||||||||||||||||||||||||
| 296 | 0 | ▶ | sub print_body(@) { shift->SUPER::body->print(@_) } | ||||||||||||||||||||||||||||||||||||
|
Subroutine
print_body: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 297 | |||||||||||||||||||||||||||||||||||||||
| 298 | |||||||||||||||||||||||||||||||||||||||
| 299 | 0 | ▶ | sub bodyObject(;$) { shift->SUPER::body(@_) } | ||||||||||||||||||||||||||||||||||||
|
Subroutine
bodyObject: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 300 | |||||||||||||||||||||||||||||||||||||||
| 301 | |||||||||||||||||||||||||||||||||||||||
| 302 | sub remove_sig(;$) | ||||||||||||||||||||||||||||||||||||||
| 303 | 0 | ▶ | { my $self = shift; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
remove_sig: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 304 | 0 | ▶ | my $lines = shift || 10; | ||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
shift() || 10
MC/DC0%0/1
shift() || 10
shift()
Truth table0%0/2
A
A= shift()
| |||||||||||||||||||||||||||||||||||||||
| 305 | 0 | my $stripped = $self->decoded->stripSignature(max_lines => $lines); | |||||||||||||||||||||||||||||||||||||
| 306 | 0 | ▶ | $self->body($stripped) if defined $stripped; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 307 | 0 | $stripped; | |||||||||||||||||||||||||||||||||||||
| 308 | } | ||||||||||||||||||||||||||||||||||||||
| 309 | |||||||||||||||||||||||||||||||||||||||
| 310 | |||||||||||||||||||||||||||||||||||||||
| 311 | sub tidy_body(;$) | ||||||||||||||||||||||||||||||||||||||
| 312 | 0 | ▶ | { my $self = shift; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
tidy_body: not called CC=7 SCAR=40.3
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 313 | |||||||||||||||||||||||||||||||||||||||
| 314 | 0 | ▶ | my $body = $self->body or return; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 315 | 0 | my @body = $body->lines; | |||||||||||||||||||||||||||||||||||||
| 316 | |||||||||||||||||||||||||||||||||||||||
| 317 | 0 | ▶ | shift @body while @body && $body[0] =~ m/^\s*$/; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
@body and $body[0] =~ /^\s*$/
MC/DC0%0/2
@body and $body[0] =~ /^\s*$/
@body
$body[0] =~ /^\s*$/
Truth table0%0/3
A and B
A= @bodyB= $body[0] =~ /^\s*$/
| |||||||||||||||||||||||||||||||||||||||
| 318 | 0 | ▶ | pop @body while @body && $body[-1] =~ m/^\s*$/; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
@body and $body[-1] =~ /^\s*$/
MC/DC0%0/2
@body and $body[-1] =~ /^\s*$/
@body
$body[-1] =~ /^\s*$/
Truth table0%0/3
A and B
A= @bodyB= $body[-1] =~ /^\s*$/
| |||||||||||||||||||||||||||||||||||||||
| 319 | |||||||||||||||||||||||||||||||||||||||
| 320 | 0 | ▶ | return $body if $body->nrLines == @body; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 321 | 0 | my $new = Mail::Message::Body::Lines->new(based_on => $body, data=>\@body); | |||||||||||||||||||||||||||||||||||||
| 322 | 0 | $self->body($new); | |||||||||||||||||||||||||||||||||||||
| 323 | } | ||||||||||||||||||||||||||||||||||||||
| 324 | |||||||||||||||||||||||||||||||||||||||
| 325 | |||||||||||||||||||||||||||||||||||||||
| 326 | sub smtpsend(@) | ||||||||||||||||||||||||||||||||||||||
| 327 | 0 | ▶ | { my ($self, %args) = @_; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
smtpsend: not called CC=9 SCAR=45.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 328 | 0 | ▶ | my $from = $args{MailFrom} || $ENV{MAILADDRESS} || $ENV{USER} || 'unknown'; | ||||||||||||||||||||||||||||||||||||
|
Condition0%0/8
$args{'MailFrom'} || $ENV{'MAILADDRESS'} || $ENV{'USER'} || 'unknown'
$args{"MailFrom"} or $ENV{"MAILADDRESS"} or $ENV{"USER"}
$args{"MailFrom"} or $ENV{"MAILADDRESS"}
MC/DC0%0/3
$args{'MailFrom'} || $ENV{'MAILADDRESS'} || $ENV{'USER'} || 'unknown'
$args{"MailFrom"}
$ENV{"MAILADDRESS"}
$ENV{"USER"}
Truth table0%0/4
A or B or C
A= $args{"MailFrom"}B= $ENV{"MAILADDRESS"}C= $ENV{"USER"}
| |||||||||||||||||||||||||||||||||||||||
| 329 | 0 | ▶ | $args{helo} ||= delete $args{Hello}; | ||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$args{"helo"} ||= delete $args{"Hello"}
MC/DC0%0/2
$args{"helo"} ||= delete $args{"Hello"}
$args{"helo"}
delete $args{"Hello"}
Truth table0%0/3
A ||= B
A= $args{"helo"}B= delete $args{"Hello"}
| |||||||||||||||||||||||||||||||||||||||
| 330 | 0 | ▶ | $args{port} ||= delete $args{Port}; | ||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$args{"port"} ||= delete $args{"Port"}
MC/DC0%0/2
$args{"port"} ||= delete $args{"Port"}
$args{"port"}
delete $args{"Port"}
Truth table0%0/3
A ||= B
A= $args{"port"}B= delete $args{"Port"}
| |||||||||||||||||||||||||||||||||||||||
| 331 | 0 | ▶ | $args{smtp_debug} ||= delete $args{Debug}; | ||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$args{"smtp_debug"} ||= delete $args{"Debug"}
MC/DC0%0/2
$args{"smtp_debug"} ||= delete $args{"Debug"}
$args{"smtp_debug"}
delete $args{"Debug"}
Truth table0%0/3
A ||= B
A= $args{"smtp_debug"}B= delete $args{"Debug"}
| |||||||||||||||||||||||||||||||||||||||
| 332 | |||||||||||||||||||||||||||||||||||||||
| 333 | 0 | my $host = $args{Host}; | |||||||||||||||||||||||||||||||||||||
| 334 | 0 | ▶ | unless(defined $host) | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 335 | 0 | { my $hosts = $ENV{SMTPHOSTS}; | |||||||||||||||||||||||||||||||||||||
| 336 | 0 | ▶ | $host = (split /\:/, $hosts)[0] if defined $hosts; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 337 | } | ||||||||||||||||||||||||||||||||||||||
| 338 | 0 | $args{host} = $host; | |||||||||||||||||||||||||||||||||||||
| 339 | |||||||||||||||||||||||||||||||||||||||
| 340 | 0 | $self->send(via => 'smtp', %args); | |||||||||||||||||||||||||||||||||||||
| 341 | } | ||||||||||||||||||||||||||||||||||||||
| 342 | |||||||||||||||||||||||||||||||||||||||
| 343 | #------------ | ||||||||||||||||||||||||||||||||||||||
| 344 | |||||||||||||||||||||||||||||||||||||||
| 345 | |||||||||||||||||||||||||||||||||||||||
| 346 | sub as_mbox_string() | ||||||||||||||||||||||||||||||||||||||
| 347 | 0 | ▶ | { my $self = shift; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
as_mbox_string: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 348 | 0 | my $mboxmsg = Mail::Box::Mbox->coerce($self); | |||||||||||||||||||||||||||||||||||||
| 349 | |||||||||||||||||||||||||||||||||||||||
| 350 | 0 | my $buffer = ''; | |||||||||||||||||||||||||||||||||||||
| 351 | 0 | my $file = Mail::Box::FastScalar->new(\$buffer); | |||||||||||||||||||||||||||||||||||||
| 352 | 0 | $mboxmsg->print($file); | |||||||||||||||||||||||||||||||||||||
| 353 | 0 | $buffer; | |||||||||||||||||||||||||||||||||||||
| 354 | } | ||||||||||||||||||||||||||||||||||||||
| 355 | |||||||||||||||||||||||||||||||||||||||
| 356 | #------------ | ||||||||||||||||||||||||||||||||||||||
| 357 | |||||||||||||||||||||||||||||||||||||||
| 358 | |||||||||||||||||||||||||||||||||||||||
| 359 | BEGIN { | ||||||||||||||||||||||||||||||||||||||
| 360 | 1 | ▶ | no warnings; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||
| 361 | *Mail::Internet::new = sub (@) | ||||||||||||||||||||||||||||||||||||||
| 362 | 0 | ▶ | { my $class = shift; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||
| 363 | 0 | Mail::Message::Replace::MailInternet->new(@_); | |||||||||||||||||||||||||||||||||||||
| 364 | 1 | ▶ | }; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||
| 365 | } | ||||||||||||||||||||||||||||||||||||||
| 366 | |||||||||||||||||||||||||||||||||||||||
| 367 | |||||||||||||||||||||||||||||||||||||||
| 368 | sub isa($) | ||||||||||||||||||||||||||||||||||||||
| 369 | 0 | ▶ | { my ($thing, $class) = @_; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
isa: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||
| 370 | 0 | ▶ | return 1 if $class eq 'Mail::Internet'; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 371 | 0 | $thing->SUPER::isa($class); | |||||||||||||||||||||||||||||||||||||
| 372 | } | ||||||||||||||||||||||||||||||||||||||
| 373 | |||||||||||||||||||||||||||||||||||||||
| 374 | #------------ | ||||||||||||||||||||||||||||||||||||||
| 375 | |||||||||||||||||||||||||||||||||||||||
| 376 | |||||||||||||||||||||||||||||||||||||||
| 377 | sub coerce() { confess } | ||||||||||||||||||||||||||||||||||||||
| 378 | |||||||||||||||||||||||||||||||||||||||
| 379 | |||||||||||||||||||||||||||||||||||||||
| 380 | 1 | 1; | |||||||||||||||||||||||||||||||||||||
| 381 | |||||||||||||||||||||||||||||||||||||||