Message/Field/Unstructured.pm

filter: Statementstmt 100% 21 / 21 Branchbran 62.5% 5 / 8 Conditioncond 83.3% 5 / 6 MC/DCmcdc 66.6% 2 / 3 Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 1 totaltotal 86.3% 38 / 44 SCAR 19.6
CC
7
Cov
89%
init
7.3
BEGIN
1.0
BEGIN
1.0
CRAP 7.1
« Message/Convert/MailInternet.pm ↑ Summary Message/TransferEnc/EightBit.pm »
1 # Copyrights 2001-2023 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::Field::Unstructured;
10 24 ▶use vars '$VERSION';
Subroutine BEGIN: called CC=1 SCAR=0.0
11 24 $VERSION = '3.013';
12  
13 24 ▶use base 'Mail::Message::Field::Full';
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 24 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 24 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
17  
18  
19 sub init($)
20 7 ▶{ my ($self, $args) = @_;
Subroutine init: called CC=7 SCAR=19.9
Pod undocumented
21  
22 7 ▶ if($args->{body} && ($args->{encoding} || $args->{charset}))
Branch: 1 branch
BranchTrueFalseTotal
if ($args->{"body"} and $args->{"encoding"} || $args->{"charset"}) 2 5 7
Condition83%5/6
$args->{"body"} and $args->{"encoding"} || $args->{"charset"}
!ll&&!rl&&r
232
$args->{"encoding"} or $args->{"charset"}
l!l&&r!l&&!r
023
MC/DC66%2/3
$args->{"body"} and $args->{"encoding"} || $args->{"charset"}
$args->{"body"} $args->{"encoding"} $args->{"charset"}
Truth table75%3/4
A and B or C
A= $args->{"body"}B= $args->{"encoding"}C= $args->{"charset"}
ABCresult
0XX0
1000
11X1
1011
23 2 { $args->{body} = $self->encode($args->{body}, %$args);
24 }
25 7 ▶ $self->SUPER::init($args) or return;
Branch: 1 branch
BranchTrueFalseTotal
$self->SUPER::init($args) or return 0 7 7
26  
27 $self->log(WARNING =>"Attributes are not supported for unstructured fields")
28 7 ▶ if defined $args->{attributes};
Branch: 1 branch
BranchTrueFalseTotal
if defined $args->{"attributes"} 0 7 7
29  
30 $self->log(WARNING => "No extras for unstructured fields")
31 7 ▶ if defined $args->{extra};
Branch: 1 branch
BranchTrueFalseTotal
if defined $args->{"extra"} 0 7 7
32  
33 7 $self;
34 }
35  
36  
37 24 1;
« Message/Convert/MailInternet.pm ↑ Summary Message/TransferEnc/EightBit.pm »