line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::LoadAllModules; |
2
|
4
|
|
|
4
|
|
12406
|
use strict; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
133
|
|
3
|
4
|
|
|
4
|
|
19
|
use warnings; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
109
|
|
4
|
4
|
|
|
4
|
|
4398
|
use Module::Pluggable::Object; |
|
4
|
|
|
|
|
51446
|
|
|
4
|
|
|
|
|
163
|
|
5
|
4
|
|
|
4
|
|
4707
|
use List::MoreUtils qw(any); |
|
4
|
|
|
|
|
6753
|
|
|
4
|
|
|
|
|
592
|
|
6
|
4
|
|
|
4
|
|
2554
|
use Test::More (); |
|
4
|
|
|
|
|
18
|
|
|
4
|
|
|
|
|
154
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.022'; |
9
|
|
|
|
|
|
|
|
10
|
4
|
|
|
4
|
|
24
|
use Exporter; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
1897
|
|
11
|
|
|
|
|
|
|
our @ISA = qw/Exporter/; |
12
|
|
|
|
|
|
|
our @EXPORT = qw/all_uses_ok/; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub all_uses_ok { |
15
|
3
|
|
|
3
|
1
|
2095
|
my %param = @_; |
16
|
3
|
|
|
|
|
6
|
my $search_path = $param{search_path}; |
17
|
3
|
50
|
|
|
|
15
|
unless ($search_path) { |
18
|
0
|
|
|
|
|
0
|
Test::More::plan skip_all => 'no search path'; |
19
|
0
|
|
|
|
|
0
|
exit; |
20
|
|
|
|
|
|
|
} |
21
|
3
|
|
|
|
|
15
|
Test::More::plan('no_plan'); |
22
|
3
|
100
|
|
|
|
4
|
my @exceptions = @{ $param{except} || [] }; |
|
3
|
|
|
|
|
24
|
|
23
|
|
|
|
|
|
|
my @lib |
24
|
3
|
100
|
|
|
|
7
|
= @{ $param{lib} || [ 'lib' ] }; |
|
3
|
|
|
|
|
20
|
|
25
|
3
|
|
|
|
|
6
|
foreach my $class ( |
|
4
|
|
|
|
|
1395
|
|
26
|
|
|
|
|
|
|
grep { !is_excluded( $_, @exceptions ) } |
27
|
|
|
|
|
|
|
sort do { |
28
|
3
|
|
|
|
|
7
|
local @INC = @lib; |
29
|
3
|
|
|
|
|
27
|
my $finder = Module::Pluggable::Object->new( |
30
|
|
|
|
|
|
|
search_path => $search_path ); |
31
|
3
|
|
|
|
|
35
|
( $search_path, $finder->plugins ); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
) |
34
|
|
|
|
|
|
|
{ |
35
|
4
|
|
|
|
|
35
|
Test::More::use_ok($class); |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub is_excluded { |
40
|
4
|
|
|
4
|
0
|
15
|
my ( $module, @exceptions ) = @_; |
41
|
4
|
50
|
|
2
|
|
61
|
any { $module eq $_ || $module =~ /$_/ } @exceptions; |
|
2
|
|
|
|
|
30
|
|
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
__END__ |