| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Sisimai::Reason::Vacation; |
|
2
|
10
|
|
|
10
|
|
1617
|
use feature ':5.10'; |
|
|
10
|
|
|
|
|
46
|
|
|
|
10
|
|
|
|
|
707
|
|
|
3
|
10
|
|
|
10
|
|
54
|
use strict; |
|
|
10
|
|
|
|
|
21
|
|
|
|
10
|
|
|
|
|
169
|
|
|
4
|
10
|
|
|
10
|
|
40
|
use warnings; |
|
|
10
|
|
|
|
|
16
|
|
|
|
10
|
|
|
|
|
1865
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
1
|
21
|
sub text { 'vacation' } |
|
7
|
4
|
|
|
4
|
0
|
17
|
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
|
289
|
my $class = shift; |
|
15
|
32
|
|
100
|
|
|
97
|
my $argv1 = shift // return undef; |
|
16
|
|
|
|
|
|
|
|
|
17
|
31
|
|
|
|
|
62
|
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
|
|
|
|
72
|
return 1 if grep { rindex($argv1, $_) > -1 } @$index; |
|
|
124
|
|
|
|
|
275
|
|
|
24
|
31
|
|
|
|
|
118
|
return 0; |
|
25
|
|
|
|
|
|
|
} |
|
26
|
1
|
|
|
1
|
0
|
4
|
sub true { return undef } |
|
27
|
|
|
|
|
|
|
1; |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__END__ |