line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Tangerine::hook::testloading; |
2
|
|
|
|
|
|
|
$Tangerine::hook::testloading::VERSION = '0.20'; |
3
|
2
|
|
|
2
|
|
1038
|
use strict; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
49
|
|
4
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
51
|
|
5
|
2
|
|
|
2
|
|
10
|
use parent 'Tangerine::Hook'; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
11
|
|
6
|
2
|
|
|
2
|
|
125
|
use List::Util 1.33 qw(any); |
|
2
|
|
|
|
|
39
|
|
|
2
|
|
|
|
|
115
|
|
7
|
2
|
|
|
2
|
|
10
|
use Tangerine::HookData; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
42
|
|
8
|
2
|
|
|
2
|
|
9
|
use Tangerine::Occurence; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
56
|
|
9
|
2
|
|
|
2
|
|
9
|
use Tangerine::Utils qw(stripquotelike); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
395
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub run { |
12
|
31
|
|
|
31
|
1
|
46
|
my ($self, $s) = @_; |
13
|
31
|
100
|
100
|
80
|
|
141
|
if (scalar(@$s) > 1 && any { $s->[0] eq $_ } qw/require_ok syntax_ok use_ok/) { |
|
80
|
|
|
|
|
413
|
|
14
|
16
|
100
|
|
|
|
234
|
return if $s->[1] eq ';'; |
15
|
13
|
|
|
|
|
324
|
my @modules = stripquotelike((@$s)[1..$#$s]); |
16
|
13
|
100
|
|
|
|
39
|
return Tangerine::HookData->new( |
17
|
|
|
|
|
|
|
children => [ |
18
|
|
|
|
|
|
|
($s->[0] eq 'require_ok' ? |
19
|
|
|
|
|
|
|
('require', $modules[0]) : |
20
|
|
|
|
|
|
|
('use', @modules) |
21
|
|
|
|
|
|
|
) |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
], |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
} |
26
|
15
|
|
|
|
|
79
|
return; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
__END__ |