line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::LocalFunctions; |
2
|
|
|
|
|
|
|
|
3
|
21
|
|
|
21
|
|
164162
|
use strict; |
|
21
|
|
|
|
|
116
|
|
|
21
|
|
|
|
|
1116
|
|
4
|
21
|
|
|
21
|
|
115
|
use warnings; |
|
21
|
|
|
|
|
44
|
|
|
21
|
|
|
|
|
750
|
|
5
|
21
|
|
|
21
|
|
11603
|
use Test::LocalFunctions::Receptor; |
|
21
|
|
|
|
|
66
|
|
|
21
|
|
|
|
|
706
|
|
6
|
21
|
|
|
21
|
|
22285
|
use Module::Load; |
|
21
|
|
|
|
|
28099
|
|
|
21
|
|
|
|
|
199
|
|
7
|
21
|
|
|
21
|
|
20073
|
use parent qw/Test::Builder::Module/; |
|
21
|
|
|
|
|
6792
|
|
|
21
|
|
|
|
|
254
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '0.23'; |
10
|
|
|
|
|
|
|
our @EXPORT = qw/all_local_functions_ok local_functions_ok which_module_is_used/; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
my $backend_module; |
13
|
|
|
|
|
|
|
BEGIN { |
14
|
|
|
|
|
|
|
my $select_backend_module = sub { |
15
|
21
|
|
|
|
|
249
|
eval { require Compiler::Lexer }; |
|
21
|
|
|
|
|
17289
|
|
16
|
21
|
100
|
66
|
|
|
161004
|
return 'Test::LocalFunctions::PPI' if ( $ENV{T_LF_PPI} || $@ || $Compiler::Lexer::VERSION < 0.13 ); |
|
|
|
66
|
|
|
|
|
17
|
19
|
|
|
|
|
1543
|
return 'Test::LocalFunctions::Fast'; |
18
|
21
|
|
|
21
|
|
208684
|
}; |
19
|
21
|
|
|
|
|
79
|
$backend_module = $select_backend_module->(); |
20
|
21
|
|
|
|
|
159
|
load $backend_module; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub all_local_functions_ok { |
24
|
8
|
|
|
8
|
1
|
286
|
my ($args) = @_; |
25
|
8
|
|
|
|
|
70
|
return Test::LocalFunctions::Receptor::all_local_functions_ok( $backend_module, $args ); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub local_functions_ok { |
29
|
11
|
|
|
11
|
1
|
28020
|
my ( $lib, $args ) = @_; |
30
|
11
|
|
|
|
|
91
|
return Test::LocalFunctions::Receptor::local_functions_ok( $backend_module, $lib, $args ); |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub which_backend_is_used { |
34
|
2
|
|
|
2
|
1
|
2750
|
return $backend_module; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
__END__ |