line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Haineko::SMTPD::Milter; |
2
|
7
|
|
|
7
|
|
5012
|
use strict; |
|
7
|
|
|
|
|
13
|
|
|
7
|
|
|
|
|
290
|
|
3
|
7
|
|
|
7
|
|
42
|
use warnings; |
|
7
|
|
|
|
|
12
|
|
|
7
|
|
|
|
|
229
|
|
4
|
7
|
|
|
7
|
|
1834
|
use Try::Tiny; |
|
7
|
|
|
|
|
3424
|
|
|
7
|
|
|
|
|
464
|
|
5
|
7
|
|
|
7
|
|
20144
|
use Module::Load; |
|
7
|
|
|
|
|
9436
|
|
|
7
|
|
|
|
|
45
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub import { |
8
|
35
|
|
|
35
|
|
1395
|
my $class = shift; |
9
|
35
|
|
100
|
|
|
172
|
my $argvs = shift || return 0; # (Ref->Array) Module names |
10
|
32
|
|
|
|
|
51
|
my $llist = []; |
11
|
|
|
|
|
|
|
|
12
|
32
|
100
|
|
|
|
118
|
return 0 unless ref $argvs eq 'ARRAY'; |
13
|
31
|
|
|
|
|
70
|
for my $e ( @$argvs ){ |
14
|
|
|
|
|
|
|
# Load each module |
15
|
2
|
50
|
|
|
|
19
|
$e =~ s/\A/Haineko::SMTPD::Milter::/ unless $e =~ /\A[+]/; |
16
|
2
|
|
|
|
|
7
|
$e =~ s/\A[+]//; |
17
|
|
|
|
|
|
|
try { |
18
|
2
|
|
|
2
|
|
93
|
Module::Load::load( $e ); |
19
|
2
|
|
|
|
|
33
|
push @$llist, $e; |
20
|
|
|
|
|
|
|
} catch { |
21
|
0
|
|
|
0
|
|
0
|
next; |
22
|
2
|
|
|
|
|
22
|
}; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
31
|
|
|
|
|
171
|
return $llist; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub libs { |
29
|
21
|
|
|
21
|
1
|
2307
|
my $class = shift; |
30
|
21
|
|
50
|
|
|
80
|
my $argvs = shift || return 0; # (Ref->Array) Path names |
31
|
21
|
|
|
|
|
38
|
my $count = 0; |
32
|
|
|
|
|
|
|
|
33
|
21
|
100
|
|
|
|
117
|
return 0 unless ref $argvs eq 'ARRAY'; |
34
|
19
|
|
|
|
|
62
|
for my $e ( @$argvs ){ |
35
|
3
|
50
|
|
|
|
10
|
next if grep { $e eq $_ } @$INC; |
|
0
|
|
|
|
|
0
|
|
36
|
3
|
|
|
|
|
5
|
unshift @INC, $e; |
37
|
3
|
|
|
|
|
7
|
$count++; |
38
|
|
|
|
|
|
|
} |
39
|
19
|
|
|
|
|
64
|
return scalar $count; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub conn { |
43
|
|
|
|
|
|
|
# Implement at sub class |
44
|
1
|
|
|
1
|
1
|
518
|
return 1; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub ehlo { |
48
|
|
|
|
|
|
|
# Implement at sub class |
49
|
1
|
|
|
1
|
1
|
505
|
return 1; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub mail { |
53
|
|
|
|
|
|
|
# Implement at sub class |
54
|
1
|
|
|
1
|
1
|
529
|
return 1 |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub rcpt { |
58
|
|
|
|
|
|
|
# Implement at sub class |
59
|
1
|
|
|
1
|
1
|
483
|
return 1; |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
sub head { |
63
|
|
|
|
|
|
|
# Implement at sub class |
64
|
1
|
|
|
1
|
1
|
486
|
return 1; |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
sub body { |
68
|
|
|
|
|
|
|
# Implement at sub class |
69
|
1
|
|
|
1
|
1
|
486
|
return 1; |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
1; |
73
|
|
|
|
|
|
|
__END__ |