line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Sisimai::Reason::Vacation; |
2
|
10
|
|
|
10
|
|
1376
|
use feature ':5.10'; |
|
10
|
|
|
|
|
17
|
|
|
10
|
|
|
|
|
702
|
|
3
|
10
|
|
|
10
|
|
52
|
use strict; |
|
10
|
|
|
|
|
16
|
|
|
10
|
|
|
|
|
187
|
|
4
|
10
|
|
|
10
|
|
40
|
use warnings; |
|
10
|
|
|
|
|
15
|
|
|
10
|
|
|
|
|
1648
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
1
|
17
|
sub text { 'vacation' } |
7
|
4
|
|
|
4
|
0
|
15
|
sub description { 'Email replied automatically due to a recipient is out of office' } |
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.22.3 |
14
|
32
|
|
|
32
|
1
|
254
|
my $class = shift; |
15
|
32
|
|
100
|
|
|
76
|
my $argv1 = shift // return undef; |
16
|
|
|
|
|
|
|
|
17
|
31
|
|
|
|
|
44
|
state $index = [ |
18
|
|
|
|
|
|
|
'i am away on vacation', |
19
|
|
|
|
|
|
|
'i am away until', |
20
|
|
|
|
|
|
|
'i am out of the office', |
21
|
|
|
|
|
|
|
'i will be traveling for work on', |
22
|
|
|
|
|
|
|
]; |
23
|
31
|
50
|
|
|
|
60
|
return 1 if grep { rindex($argv1, $_) > -1 } @$index; |
|
124
|
|
|
|
|
225
|
|
24
|
31
|
|
|
|
|
86
|
return 0; |
25
|
|
|
|
|
|
|
} |
26
|
1
|
|
|
1
|
0
|
3
|
sub true { return undef } |
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__END__ |