Sisimai/Rhost/Aol.pm

filter: Statementstmt 100% 22 / 22 Branchbran 100% 4 / 4 Conditioncond 100% 2 / 2 MC/DCmcdc 100% 1 / 1 Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 1 totaltotal 97.0% 33 / 34 CC 5 SCAR 12.5
CC
5
Cov
100%
find
5.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.5
« Sisimai/Rhost/KDDI.pm ↑ Summary Sisimai/Rhost/Apple.pm »
1 package Sisimai::Rhost::Aol;
2 5 ▶use v5.26;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 47 ▶sub find {
Subroutine find: called CC=5 SCAR=16.1
Pod undocumented
7 # Detect bounce reason for Aol Mail: https://www.aol.com
8 # @param [Sisimai::Fact] argvs Decoded email object
9 # @return [String] Detected bounce reason
10 # @see
11 # - Y!Sender Hub/SMTP Error Codes: https://senders.yahooinc.com/smtp-error-codes/
12 # - The MX record of Aol points "mx-aol.mail.gm0.yahoodns.net".
13 # @since v5.2.0
14 47 my $class = shift;
15 47 ▶ my $argvs = shift // return ""; return "" unless $argvs->{'diagnosticcode'};
Branch: 1 branch
BranchTrueFalseTotal
unless $argvs->{"diagnosticcode"} 1 45 46
Condition100%2/2
shift() // (return "")
l!l
461
MC/DC100%1/1
shift() // (return "")
shift()
Truth table100%2/2
A
A= shift()
Aresult
11
00
16  
17 45 require Sisimai::Eb;
18 45 state $messagesof = {
19 $Sisimai::Eb::ReHOST => ["Host or domain name not found"],
20 $Sisimai::Eb::Re00MX => ["type=MX: Malformed or unexpected name server reply"],
21 };
22  
23 45 my $issuedcode = $argvs->{'diagnosticcode'};
24 45 my $reasontext = '';
25  
26 45 for my $e ( keys %$messagesof ) {
27 # Try to find the error message matches with the given error message string
28 82 ▶ next unless grep { index($issuedcode, $_) > -1 } $messagesof->{ $e }->@*;
Branch: 1 branch
BranchTrueFalseTotal
unless grep {index($issuedcode, $_) != -1;} @{$$messagesof{$e}} 63 19 82
29 19 $reasontext = $e;
30 19 last;
31 }
32 45 return $reasontext;
33 }
34  
35 5 1;
36 __END__
« Sisimai/Rhost/KDDI.pm ↑ Summary Sisimai/Rhost/Apple.pm »