Message/Field/Unstructured.pm

filter: Statementstmt 100% 22 / 22 Branchbran 66.6% 4 / 6 Conditioncond 83.3% 5 / 6 MC/DCmcdc 66.6% 2 / 3 Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 1 totaltotal 88.3% 38 / 43 CC 6 SCAR 14.1
CC
6
Cov
91%
init
6.1
BEGIN
1.0
BEGIN
1.0
CRAP 4.1
« Message/Field/Flex.pm ↑ Summary Message/Part.pm »
1 # This code is part of Perl distribution Mail-Message version 4.05.
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::Field::Unstructured;{
13 28 our $VERSION = '4.05';
14 }
15  
16 28 ▶use parent 'Mail::Message::Field::Full';
Subroutine BEGIN: called CC=1 SCAR=0.0
17  
18 28 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 28 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21 28 ▶use Log::Report 'mail-message', import => [ qw/__x warning/ ];
Subroutine BEGIN: called CC=1 SCAR=0.0
22  
23 #--------------------
24  
25 sub init($)
26 7 ▶{ my ($self, $args) = @_;
Subroutine init: called CC=6 SCAR=18.2
Pod undocumented
27  
28 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
29 2 { $args->{body} = $self->encode($args->{body}, %$args);
30 }
31  
32 7 $self->SUPER::init($args);
33  
34 7 ▶ ! defined $args->{attributes} or warning __x"attributes are not supported for unstructured fields.";
Branch: 1 branch
BranchTrueFalseTotal
defined $args->{"attributes"} and &warning(&__x("attributes are not supported for unstructured fields.")) 0 7 7
35 7 ▶ ! defined $args->{extra} or warning __x"no extras for unstructured fields.";
Branch: 1 branch
BranchTrueFalseTotal
defined $args->{"extra"} and &warning(&__x("no extras for unstructured fields.")) 0 7 7
36 7 $self;
37 }
38  
39 #--------------------
40  
41 28 1;
« Message/Field/Flex.pm ↑ Summary Message/Part.pm »