line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#line 1 |
2
|
|
|
|
|
|
|
package Test::UseAllModules; |
3
|
1
|
|
|
1
|
|
3518
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
34
|
|
4
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
29
|
|
5
|
1
|
|
|
1
|
|
991
|
use warnings; |
|
1
|
|
|
|
|
15406
|
|
|
1
|
|
|
|
|
117
|
|
6
|
|
|
|
|
|
|
use ExtUtils::Manifest qw( maniread ); |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.12'; |
9
|
1
|
|
|
1
|
|
10
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
76
|
|
10
|
|
|
|
|
|
|
use Exporter; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our @ISA = qw/Exporter/; |
13
|
|
|
|
|
|
|
our @EXPORT = qw/all_uses_ok/; |
14
|
1
|
|
|
1
|
|
1079
|
|
|
1
|
|
|
|
|
20081
|
|
|
1
|
|
|
|
|
8
|
|
15
|
|
|
|
|
|
|
use Test::More; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
my $RULE = qr{^lib/(.+)\.pm$}; |
18
|
|
|
|
|
|
|
|
19
|
1
|
|
|
1
|
|
57
|
sub import { |
20
|
|
|
|
|
|
|
shift->export_to_level(1); |
21
|
1
|
50
|
33
|
|
|
5
|
|
22
|
1
|
|
|
|
|
2
|
shift if @_ && $_[0] eq 'under'; |
23
|
1
|
|
|
|
|
2
|
my @dirs = ('lib', @_); |
24
|
1
|
|
|
|
|
2
|
my %seen; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
3
|
|
25
|
1
|
|
|
|
|
3
|
@dirs = grep { !$seen{$_}++ } map { s|/+$||; $_ } @dirs; |
26
|
1
|
|
|
|
|
32
|
$RULE = '^(?:'.(join '|', @dirs).')/(.+)\.pm\s*$'; |
27
|
|
|
|
|
|
|
unshift @INC, @dirs; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
1
|
50
|
33
|
1
|
|
4
|
sub _get_module_list { |
31
|
1
|
|
|
|
|
1
|
shift if @_ && $_[0] eq 'except'; |
32
|
1
|
|
|
|
|
2
|
my @exceptions = @_; |
33
|
|
|
|
|
|
|
my @modules; |
34
|
1
|
|
|
|
|
4
|
|
35
|
|
|
|
|
|
|
my $manifest = maniread(); |
36
|
1
|
|
|
|
|
12
|
|
37
|
1
|
|
|
|
|
1690
|
READ: |
38
|
67
|
100
|
|
|
|
181
|
foreach my $file (keys %{ $manifest }) { |
39
|
33
|
|
|
|
|
78
|
if (my ($module) = $file =~ m|$RULE|) { |
40
|
|
|
|
|
|
|
$module =~ s|/|::|g; |
41
|
33
|
|
|
|
|
37
|
|
42
|
0
|
0
|
0
|
|
|
0
|
foreach my $rule (@exceptions) { |
43
|
|
|
|
|
|
|
next READ if $module eq $rule || $module =~ /$rule/; |
44
|
|
|
|
|
|
|
} |
45
|
33
|
|
|
|
|
48
|
|
46
|
|
|
|
|
|
|
push @modules, $module; |
47
|
|
|
|
|
|
|
} |
48
|
1
|
|
|
|
|
20
|
} |
49
|
|
|
|
|
|
|
return @modules; |
50
|
|
|
|
|
|
|
} |
51
|
1
|
|
|
1
|
|
7
|
|
52
|
|
|
|
|
|
|
sub _planned { Test::More->builder->{Have_Plan}; } |
53
|
|
|
|
|
|
|
|
54
|
1
|
50
|
|
1
|
1
|
20
|
sub all_uses_ok { |
55
|
0
|
0
|
|
|
|
0
|
unless (-f 'MANIFEST') { |
56
|
0
|
|
|
|
|
0
|
plan skip_all => 'no MANIFEST' unless _planned(); |
57
|
|
|
|
|
|
|
return; |
58
|
|
|
|
|
|
|
} |
59
|
1
|
|
|
|
|
2
|
|
60
|
|
|
|
|
|
|
my @modules = _get_module_list(@_); |
61
|
1
|
50
|
|
|
|
4
|
|
62
|
0
|
0
|
|
|
|
0
|
unless (@modules) { |
63
|
0
|
|
|
|
|
0
|
plan skip_all => 'no .pm files are found under the lib directory' unless _planned(); |
64
|
|
|
|
|
|
|
return; |
65
|
1
|
50
|
|
|
|
2
|
} |
66
|
|
|
|
|
|
|
plan tests => scalar @modules unless _planned(); |
67
|
1
|
|
|
|
|
144
|
|
68
|
1
|
|
|
|
|
3
|
my @failed; |
69
|
1
|
100
|
|
1
|
|
553
|
foreach my $module (@modules) { |
|
1
|
|
|
1
|
|
38
|
|
|
1
|
|
|
1
|
|
3
|
|
|
1
|
|
|
1
|
|
37
|
|
|
1
|
|
|
1
|
|
126
|
|
|
1
|
|
|
1
|
|
2
|
|
|
1
|
|
|
1
|
|
2
|
|
|
1
|
|
|
1
|
|
20
|
|
|
1
|
|
|
1
|
|
736
|
|
|
1
|
|
|
1
|
|
3
|
|
|
1
|
|
|
1
|
|
2
|
|
|
1
|
|
|
1
|
|
19
|
|
|
1
|
|
|
1
|
|
105
|
|
|
1
|
|
|
1
|
|
2
|
|
|
1
|
|
|
1
|
|
3
|
|
|
1
|
|
|
1
|
|
19
|
|
|
1
|
|
|
1
|
|
915
|
|
|
1
|
|
|
1
|
|
3
|
|
|
1
|
|
|
1
|
|
2
|
|
|
1
|
|
|
1
|
|
20
|
|
|
1
|
|
|
1
|
|
654
|
|
|
1
|
|
|
1
|
|
4
|
|
|
1
|
|
|
1
|
|
3
|
|
|
1
|
|
|
1
|
|
32
|
|
|
1
|
|
|
1
|
|
747
|
|
|
1
|
|
|
1
|
|
5
|
|
|
1
|
|
|
1
|
|
2
|
|
|
1
|
|
|
1
|
|
23
|
|
|
1
|
|
|
1
|
|
692
|
|
|
1
|
|
|
1
|
|
4
|
|
|
1
|
|
|
1
|
|
2
|
|
|
1
|
|
|
1
|
|
29
|
|
|
1
|
|
|
1
|
|
670
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
3
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|
|
|
|
|
BAIL_OUT( 'failed: ' . (join ',', @failed) ) if @failed; |
74
|
|
|
|
|
|
|
} |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
1; |
77
|
|
|
|
|
|
|
__END__ |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
#line 159 |