line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
########################################### |
2
|
|
|
|
|
|
|
# File::Comments::Plugin -- 2005, Mike Schilli |
3
|
|
|
|
|
|
|
########################################### |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
########################################### |
6
|
|
|
|
|
|
|
package File::Comments::Plugin; |
7
|
|
|
|
|
|
|
########################################### |
8
|
|
|
|
|
|
|
|
9
|
9
|
|
|
9
|
|
4257
|
use strict; |
|
9
|
|
|
|
|
16
|
|
|
9
|
|
|
|
|
299
|
|
10
|
9
|
|
|
9
|
|
41
|
use warnings; |
|
9
|
|
|
|
|
15
|
|
|
9
|
|
|
|
|
238
|
|
11
|
9
|
|
|
9
|
|
65
|
use Log::Log4perl qw(:easy); |
|
9
|
|
|
|
|
16
|
|
|
9
|
|
|
|
|
71
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
########################################### |
14
|
|
|
|
|
|
|
sub new { |
15
|
|
|
|
|
|
|
########################################### |
16
|
99
|
|
|
99
|
0
|
224
|
my($class, %options) = @_; |
17
|
|
|
|
|
|
|
|
18
|
99
|
|
|
|
|
251
|
my $self = { |
19
|
|
|
|
|
|
|
%options, |
20
|
|
|
|
|
|
|
}; |
21
|
|
|
|
|
|
|
|
22
|
99
|
|
|
|
|
241
|
bless $self, $class; |
23
|
|
|
|
|
|
|
|
24
|
99
|
|
|
|
|
439
|
$self->init(); |
25
|
|
|
|
|
|
|
|
26
|
99
|
|
|
|
|
273
|
return $self; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
########################################### |
30
|
|
|
|
|
|
|
sub applicable { |
31
|
|
|
|
|
|
|
########################################### |
32
|
42
|
|
|
42
|
0
|
70
|
my($self, $target, $cold_call) = @_; |
33
|
|
|
|
|
|
|
|
34
|
42
|
100
|
|
|
|
106
|
if($cold_call) { |
35
|
32
|
|
|
|
|
173
|
DEBUG "", __PACKAGE__, " doesn't accept cold calls"; |
36
|
32
|
|
|
|
|
222
|
return 0; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
10
|
|
|
|
|
50
|
DEBUG "", __PACKAGE__, " accepts"; |
40
|
10
|
|
|
|
|
102
|
return 1; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
########################################### |
44
|
|
|
|
|
|
|
sub comments { |
45
|
|
|
|
|
|
|
########################################### |
46
|
0
|
|
|
0
|
0
|
0
|
die "Mandatory method comments() not defined in ", ref $_[0]; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
########################################### |
50
|
|
|
|
|
|
|
sub init { |
51
|
|
|
|
|
|
|
########################################### |
52
|
0
|
|
|
0
|
0
|
0
|
die "Mandatory method init() not defined in ", ref $_[0]; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
########################################### |
56
|
|
|
|
|
|
|
sub register_suffix { |
57
|
|
|
|
|
|
|
########################################### |
58
|
286
|
|
|
286
|
0
|
512
|
my($self, $suffix) = @_; |
59
|
|
|
|
|
|
|
|
60
|
286
|
|
|
|
|
771
|
$self->mothership()->register_suffix($suffix, $self); |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
########################################### |
64
|
|
|
|
|
|
|
sub register_base { |
65
|
|
|
|
|
|
|
########################################### |
66
|
22
|
|
|
22
|
0
|
41
|
my($self, $base) = @_; |
67
|
|
|
|
|
|
|
|
68
|
22
|
|
|
|
|
80
|
$self->mothership()->register_base($base, $self); |
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
########################################### |
72
|
308
|
|
|
308
|
0
|
1410
|
sub mothership { return $_[0]->{mothership} } |
73
|
|
|
|
|
|
|
########################################### |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
1; |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
__END__ |