line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
32
|
|
2
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
69
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Code::Statistics::Target; |
5
|
|
|
|
|
|
|
$Code::Statistics::Target::VERSION = '1.190680'; |
6
|
|
|
|
|
|
|
# ABSTRACT: base class for Code::Statistic targets |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
24
|
use 5.004; |
|
1
|
|
|
|
|
4
|
|
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
5
|
use Module::Pluggable search_path => __PACKAGE__, require => 1, sub_name => 'all'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
8
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub find_targets { |
14
|
0
|
|
|
0
|
1
|
0
|
my ( $class, $file ) = @_; |
15
|
0
|
|
|
|
|
0
|
return []; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub incompatible_with { |
20
|
256
|
|
|
256
|
1
|
298
|
my ( $class, $target ) = @_; |
21
|
256
|
|
|
|
|
390
|
return 0; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub force_support { |
26
|
256
|
|
|
256
|
1
|
330
|
my ( $class, $target ) = @_; |
27
|
256
|
|
|
|
|
444
|
return 0; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=pod |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=encoding UTF-8 |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 NAME |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Code::Statistics::Target - base class for Code::Statistic targets |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 VERSION |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
version 1.190680 |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head2 find_targets |
47
|
|
|
|
|
|
|
Returns an arrayref to a list of targets found in the given file. |
48
|
|
|
|
|
|
|
Is called with the target class name and a Code::Statistics::File object. |
49
|
|
|
|
|
|
|
This function should be overridden with specific logic to actually retrieve |
50
|
|
|
|
|
|
|
the target list. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head2 incompatible_with |
53
|
|
|
|
|
|
|
Returns true if the given metric is explicitly not supported by this target. |
54
|
|
|
|
|
|
|
Is called with the target class name and a string representing the metric |
55
|
|
|
|
|
|
|
identifiers after 'Code::Statistics::Metric::'. |
56
|
|
|
|
|
|
|
Default is that all targets are compatible with all metrics. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head2 force_support |
59
|
|
|
|
|
|
|
Returns true if the given metric is forcibly supported by this target. |
60
|
|
|
|
|
|
|
Is called with the target class name and a string representing the metric |
61
|
|
|
|
|
|
|
identifiers after 'Code::Statistics::Metric::'. |
62
|
|
|
|
|
|
|
Default is that no forcing happens. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
Has higher precedence than 'incompatible_with' and should be used to |
65
|
|
|
|
|
|
|
override incompatibilities set by other metrics. |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 AUTHOR |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Christian Walde <mithaldu@yahoo.de> |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Christian Walde has dedicated the work to the Commons by waiving all of his |
75
|
|
|
|
|
|
|
or her rights to the work worldwide under copyright law and all related or |
76
|
|
|
|
|
|
|
neighboring legal rights he or she had in the work, to the extent allowable by |
77
|
|
|
|
|
|
|
law. |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
Works under CC0 do not require attribution. When citing the work, you should |
80
|
|
|
|
|
|
|
not imply endorsement by the author. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=cut |