line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Module::CPANTS::Kwalitee::CpantsErrors; |
2
|
7
|
|
|
7
|
|
3593
|
use warnings; |
|
7
|
|
|
|
|
20
|
|
|
7
|
|
|
|
|
252
|
|
3
|
7
|
|
|
7
|
|
41
|
use strict; |
|
7
|
|
|
|
|
15
|
|
|
7
|
|
|
|
|
189
|
|
4
|
7
|
|
|
7
|
|
3022
|
use version; |
|
7
|
|
|
|
|
13790
|
|
|
7
|
|
|
|
|
52
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '1.00'; |
7
|
|
|
|
|
|
|
$VERSION =~ s/_//; ## no critic |
8
|
|
|
|
|
|
|
|
9
|
21
|
|
|
21
|
1
|
70
|
sub order { 1000 } |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
################################################################## |
12
|
|
|
|
|
|
|
# Analyse |
13
|
|
|
|
|
|
|
################################################################## |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
11
|
1
|
|
sub analyse { |
16
|
|
|
|
|
|
|
# NOTE: CPANTS error should be logged somewhere, but it |
17
|
|
|
|
|
|
|
# should not annoy people. If anything wrong or interesting |
18
|
|
|
|
|
|
|
# is found in the log, add some metrics (if it's worth), |
19
|
|
|
|
|
|
|
# or just fix our problems. |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
# Note also that this stub should not be removed so that |
22
|
|
|
|
|
|
|
# this can replace the old ::CpantsErrors module, and the old |
23
|
|
|
|
|
|
|
# metrics will not be loaded while loading plugins. |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
################################################################## |
28
|
|
|
|
|
|
|
# Kwalitee Indicators |
29
|
|
|
|
|
|
|
################################################################## |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub kwalitee_indicators { |
32
|
|
|
|
|
|
|
# Older Test::Kwalitee (prior to 1.08) has hardcoded metrics |
33
|
|
|
|
|
|
|
# names in it, and if those metrics are gone from |
34
|
|
|
|
|
|
|
# Module::CPANTS::Kwalitee, it fails because the number of tests |
35
|
|
|
|
|
|
|
# is not as expected. This is not beautiful, but better than |
36
|
|
|
|
|
|
|
# to break others' distributions needlessly. |
37
|
8
|
100
|
|
8
|
1
|
64
|
if ($INC{"Test/Kwalitee.pm"}) { |
38
|
|
|
|
|
|
|
return [ |
39
|
2
|
50
|
|
0
|
|
85
|
map {+{name => $_, code => sub {1}}} |
|
8
|
|
|
|
|
41
|
|
|
0
|
|
|
|
|
0
|
|
40
|
|
|
|
|
|
|
qw/extractable no_pod_errors |
41
|
|
|
|
|
|
|
has_test_pod has_test_pod_coverage/ |
42
|
|
|
|
|
|
|
] if version->parse(Test::Kwalitee->VERSION) < version->parse(1.08); |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
6
|
|
|
|
|
40
|
return []; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
q{Listeing to: FM4 the early years}; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
__END__ |