line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Module::CPANTS::Kwalitee::CpantsErrors; |
2
|
7
|
|
|
7
|
|
3957
|
use warnings; |
|
7
|
|
|
|
|
27
|
|
|
7
|
|
|
|
|
279
|
|
3
|
7
|
|
|
7
|
|
59
|
use strict; |
|
7
|
|
|
|
|
37
|
|
|
7
|
|
|
|
|
165
|
|
4
|
7
|
|
|
7
|
|
3522
|
use version; |
|
7
|
|
|
|
|
15589
|
|
|
7
|
|
|
|
|
43
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '1.02'; |
7
|
|
|
|
|
|
|
$VERSION =~ s/_//; ## no critic |
8
|
|
|
|
|
|
|
|
9
|
21
|
|
|
21
|
1
|
72
|
sub order { 1000 } |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
################################################################## |
12
|
|
|
|
|
|
|
# Analyse |
13
|
|
|
|
|
|
|
################################################################## |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
12
|
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
|
50
|
if ($INC{"Test/Kwalitee.pm"}) { |
38
|
|
|
|
|
|
|
return [ |
39
|
2
|
50
|
|
0
|
|
95
|
map {+{name => $_, code => sub {1}}} |
|
8
|
|
|
|
|
59
|
|
|
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
|
|
|
|
|
73
|
return []; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
q{Listeing to: FM4 the early years}; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
__END__ |