line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
46
|
|
2
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
86
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Code::Statistics::Target; |
5
|
|
|
|
|
|
|
{ |
6
|
|
|
|
|
|
|
$Code::Statistics::Target::VERSION = '1.112980'; |
7
|
|
|
|
|
|
|
} |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# ABSTRACT: base class for Code::Statistic targets |
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
33
|
use 5.004; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
49
|
|
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
1
|
|
7
|
use Module::Pluggable search_path => __PACKAGE__, require => 1, sub_name => 'all'; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
10
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub find_targets { |
17
|
0
|
|
|
0
|
1
|
0
|
my ( $class, $file ) = @_; |
18
|
0
|
|
|
|
|
0
|
return []; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub incompatible_with { |
23
|
256
|
|
|
256
|
1
|
370
|
my ( $class, $target ) = @_; |
24
|
256
|
|
|
|
|
699
|
return 0; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub force_support { |
29
|
256
|
|
|
256
|
1
|
365
|
my ( $class, $target ) = @_; |
30
|
256
|
|
|
|
|
749
|
return 0; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
__END__ |
36
|
|
|
|
|
|
|
=pod |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 NAME |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Code::Statistics::Target - base class for Code::Statistic targets |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 VERSION |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
version 1.112980 |
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
|
|
|
|
|
|
|
This software is Copyright (c) 2010 by Christian Walde. |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
This is free software, licensed under: |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE, Version 2, December 2004 |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=cut |
80
|
|
|
|
|
|
|
|