Sisimai/Reason/EmailTooLarge.pm

filter: Statementstmt 100% 30 / 30 Branchbran 100% 8 / 8 Conditioncond 87.5% 7 / 8 MC/DCmcdc 75.0% 3 / 4 Subroutinesub 100% 8 / 8 Podpod 50.0% 2 / 4 totaltotal 93.5% 58 / 62 CC 9 SCAR 12.9
CC
9
Cov
98%
true
6.0
match
4.0
BEGIN
1.0
CRAP 3.6
« Sisimai/RFC3464/ThirdParty.pm ↑ Summary Sisimai/Reason/NoRelaying.pm »
1 package Sisimai::Reason::EmailTooLarge;
2 69 ▶use v5.26;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 69 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 69 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 69 ▶use Sisimai::Eb;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 74 ▶sub text { $Sisimai::Eb::ReSIZE }
Subroutine text: called CC=1 SCAR=0.0
Pod documented
8 4 ▶sub description { 'Email rejected due to an email size is too big for a destination mail server' }
Subroutine description: called CC=1 SCAR=0.0
Pod undocumented
9 2342 ▶sub match {
Subroutine match: called CC=4 SCAR=13.9
Pod documented
10 # Try to match that the given text and regular expressions
11 # @param [String] argv1 String to be matched with regular expressions
12 # @return [Integer] 0: Did not match
13 # 1: Matched
14 # @since v4.0.0
15 2342 my $class = shift;
16 2342 ▶ my $argv1 = shift // return 0;
Condition100%2/2
shift() // (return 0)
l!l
23411
MC/DC100%1/1
shift() // (return 0)
shift()
Truth table100%2/2
A
A= shift()
Aresult
11
00
17  
18 2341 state $index = [
19 "exceeds the maximum size ",
20 "line limit exceeded",
21 "message too large",
22 "size limit",
23 "taille limite du message atteinte",
24 ];
25 2341 state $pairs = [
26 ["exceeded", "message size"],
27 ["message ", "exceeds ", "limit"],
28 ["message ", "size", "exceed"],
29 ["message ", "too", "big"],
30 ];
31 2341 ▶ return 1 if grep { rindex($argv1, $_) > -1 } @$index;
Branch: 1 branch
BranchTrueFalseTotal
if grep {rindex($argv1, $_) != -1;} @$index 13 2328 2341
32 2328 ▶ return 1 if grep { Sisimai::String->aligned(\$argv1, $_) } @$pairs;
Branch: 1 branch
BranchTrueFalseTotal
if grep {"Sisimai::String"->aligned(\$argv1, $_);} @$pairs 6 2322 2328
33 2322 return 0;
34 }
35  
36 2226 ▶sub true {
Subroutine true: called CC=6 SCAR=17.9
Pod undocumented
37 # The message size is too big for the remote host
38 # @param [Sisimai::Fact] argvs Object to be detected the reason
39 # @return [Integer] 1: is too big message size
40 # 0: is not big
41 # @since v4.0.0
42 # @see http://www.ietf.org/rfc/rfc2822.txt
43 2226 my $class = shift;
44 2226 ▶ my $argvs = shift // return 0; return 1 if $argvs->{'reason'} eq $Sisimai::Eb::ReSIZE;
Branch: 1 branch
BranchTrueFalseTotal
if $argvs->{"reason"} eq $Sisimai::Eb::ReSIZE 1 2224 2225
Condition100%2/2
shift() // (return 0)
l!l
22251
MC/DC100%1/1
shift() // (return 0)
shift()
Truth table100%2/2
A
A= shift()
Aresult
11
00
45  
46 2224 ▶ my $statuscode = $argvs->{'deliverystatus'} // '';
Condition50%1/2
$argvs->{"deliverystatus"} // ""
l!l
22240
MC/DC0%0/1
$argvs->{"deliverystatus"} // ""
$argvs->{"deliverystatus"}
Truth table50%1/2
A
A= $argvs->{"deliverystatus"}
Aresult
11
00
47 2224 ▶ my $tempreason = Sisimai::SMTP::Status->name($statuscode) || '';
Condition100%2/2
'Sisimai::SMTP::Status'->name($statuscode) || ''
l!l
1320904
MC/DC100%1/1
'Sisimai::SMTP::Status'->name($statuscode) || ''
'Sisimai::SMTP::Status'->name($statuscode)
Truth table100%2/2
A
A= 'Sisimai::SMTP::Status'->name($statuscode)
Aresult
11
00
48  
49 # Delivery status code points "EmailTooLarge".
50 # Status: 5.3.4
51 # Diagnostic-Code: SMTP; 552 5.3.4 Error: message file too big
52 #
53 # Status: 5.2.3
54 # Diagnostic-Code: Message length exceeds administrative limit
55 2224 ▶ return 1 if $tempreason eq $Sisimai::Eb::ReSIZE;
Branch: 1 branch
BranchTrueFalseTotal
if $tempreason eq $Sisimai::Eb::ReSIZE 60 2164 2224
56 2164 return __PACKAGE__->match(lc $argvs->{'diagnosticcode'});
57 }
58  
59 69 1;
60 __END__
« Sisimai/RFC3464/ThirdParty.pm ↑ Summary Sisimai/Reason/NoRelaying.pm »