line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Sisimai::Reason::Expired; |
2
|
19
|
|
|
19
|
|
1632
|
use feature ':5.10'; |
|
19
|
|
|
|
|
33
|
|
|
19
|
|
|
|
|
1127
|
|
3
|
19
|
|
|
19
|
|
87
|
use strict; |
|
19
|
|
|
|
|
32
|
|
|
19
|
|
|
|
|
280
|
|
4
|
19
|
|
|
19
|
|
79
|
use warnings; |
|
19
|
|
|
|
|
25
|
|
|
19
|
|
|
|
|
3163
|
|
5
|
|
|
|
|
|
|
|
6
|
5
|
|
|
5
|
1
|
13
|
sub text { 'expired' } |
7
|
4
|
|
|
4
|
0
|
14
|
sub description { 'Delivery time has expired due to a connection failure' } |
8
|
|
|
|
|
|
|
sub match { |
9
|
|
|
|
|
|
|
# Try to match that the given text and regular expressions |
10
|
|
|
|
|
|
|
# @param [String] argv1 String to be matched with regular expressions |
11
|
|
|
|
|
|
|
# @return [Integer] 0: Did not match |
12
|
|
|
|
|
|
|
# 1: Matched |
13
|
|
|
|
|
|
|
# @since v4.0.0 |
14
|
254
|
|
|
254
|
1
|
365
|
my $class = shift; |
15
|
254
|
|
50
|
|
|
488
|
my $argv1 = shift // return undef; |
16
|
|
|
|
|
|
|
|
17
|
254
|
|
|
|
|
403
|
state $index = [ |
18
|
|
|
|
|
|
|
'connection timed out', |
19
|
|
|
|
|
|
|
'could not find a gateway for', |
20
|
|
|
|
|
|
|
'delivery attempts will continue to be', |
21
|
|
|
|
|
|
|
'delivery time expired', |
22
|
|
|
|
|
|
|
'failed to deliver to domain ', |
23
|
|
|
|
|
|
|
'giving up on', |
24
|
|
|
|
|
|
|
'have been failing for a long time', |
25
|
|
|
|
|
|
|
'has been delayed', |
26
|
|
|
|
|
|
|
'it has not been collected after', |
27
|
|
|
|
|
|
|
'message expired after sitting in queue for', |
28
|
|
|
|
|
|
|
'message expired, connection refulsed', |
29
|
|
|
|
|
|
|
'message timed out', |
30
|
|
|
|
|
|
|
'retry time not reached for any host after a long failure period', |
31
|
|
|
|
|
|
|
'server did not respond', |
32
|
|
|
|
|
|
|
'this message has been in the queue too long', |
33
|
|
|
|
|
|
|
'unable to deliver message after multiple retries', |
34
|
|
|
|
|
|
|
'was not reachable within the allowed queue period', |
35
|
|
|
|
|
|
|
'your message could not be delivered for more than', |
36
|
|
|
|
|
|
|
]; |
37
|
254
|
100
|
|
|
|
496
|
return 1 if grep { rindex($argv1, $_) > -1 } @$index; |
|
4572
|
|
|
|
|
5810
|
|
38
|
203
|
|
|
|
|
483
|
return 0; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub true { |
42
|
|
|
|
|
|
|
# Delivery expired due to connection failure or network error |
43
|
|
|
|
|
|
|
# @param [Sisimai::Data] argvs Object to be detected the reason |
44
|
|
|
|
|
|
|
# @return [Integer] 1: is expired |
45
|
|
|
|
|
|
|
# 0: is not expired |
46
|
|
|
|
|
|
|
# @see http://www.ietf.org/rfc/rfc2822.txt |
47
|
2
|
|
|
2
|
0
|
6
|
return undef; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1; |
51
|
|
|
|
|
|
|
__END__ |