Sisimai/Reason/MailerError.pm

filter: Statementstmt 100% 21 / 21 Branchbran 100% 2 / 2 Conditioncond 100% 2 / 2 MC/DCmcdc 100% 1 / 1 Subroutinesub 100% 8 / 8 Podpod 50.0% 2 / 4 totaltotal 94.7% 36 / 38 CC 3 SCAR 4.7
CC
3
Cov
100%
match
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.6
« Sisimai/Reason/Vacation.pm ↑ Summary Sisimai/Reason/SystemFull.pm »
1 package Sisimai::Reason::MailerError;
2 34 ▶use v5.26;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 34 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 34 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 34 ▶use Sisimai::Eb;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 10 ▶sub text { $Sisimai::Eb::ReUNIX }
Subroutine text: called CC=1 SCAR=0.0
Pod documented
8 4 ▶sub description { 'Email returned due to a mailer program has not exited successfully' }
Subroutine description: called CC=1 SCAR=0.0
Pod undocumented
9 459 ▶sub match {
Subroutine match: called CC=3 SCAR=11.0
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 459 my $class = shift;
16 459 ▶ my $argv1 = shift // return 0;
Condition100%2/2
shift() // (return 0)
l!l
4581
MC/DC100%1/1
shift() // (return 0)
shift()
Truth table100%2/2
A
A= shift()
Aresult
11
00
17  
18 458 state $index = [
19 ' || exit ',
20 'procmail: ',
21 'bin/procmail',
22 'bin/maidrop',
23 'command failed: ',
24 'command died with status ',
25 'command output:',
26 'mailer error',
27 'pipe to |/',
28 'x-unix; ',
29 ];
30 458 ▶ return 1 if grep { rindex($argv1, $_) > -1 } @$index;
Branch: 1 branch
BranchTrueFalseTotal
if grep {rindex($argv1, $_) != -1;} @$index 32 426 458
31 426 return 0;
32 }
33  
34 2 ▶sub true {
Subroutine true: called CC=1 SCAR=0.0
Pod undocumented
35 # The bounce reason is mailer error or not
36 # @param [Sisimai::Fact] argvs Object to be detected the reason
37 # @return [Integer] 1: is mailer error
38 # 0: is not mailer error
39 # @see http://www.ietf.org/rfc/rfc2822.txt
40 2 return 0;
41 }
42  
43 34 1;
44 __END__
« Sisimai/Reason/Vacation.pm ↑ Summary Sisimai/Reason/SystemFull.pm »