line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Tangerine::hook::use; |
2
|
|
|
|
|
|
|
$Tangerine::hook::use::VERSION = '0.20'; |
3
|
15
|
|
|
15
|
|
1421
|
use 5.010; |
|
15
|
|
|
|
|
49
|
|
4
|
15
|
|
|
15
|
|
73
|
use strict; |
|
15
|
|
|
|
|
24
|
|
|
15
|
|
|
|
|
304
|
|
5
|
15
|
|
|
15
|
|
68
|
use warnings; |
|
15
|
|
|
|
|
33
|
|
|
15
|
|
|
|
|
405
|
|
6
|
15
|
|
|
15
|
|
65
|
use parent 'Tangerine::Hook'; |
|
15
|
|
|
|
|
26
|
|
|
15
|
|
|
|
|
79
|
|
7
|
15
|
|
|
15
|
|
918
|
use List::Util 1.33 qw(any); |
|
15
|
|
|
|
|
322
|
|
|
15
|
|
|
|
|
1024
|
|
8
|
15
|
|
|
15
|
|
81
|
use Tangerine::HookData; |
|
15
|
|
|
|
|
29
|
|
|
15
|
|
|
|
|
409
|
|
9
|
15
|
|
|
15
|
|
84
|
use Tangerine::Occurence; |
|
15
|
|
|
|
|
30
|
|
|
15
|
|
|
|
|
410
|
|
10
|
15
|
|
|
15
|
|
72
|
use Tangerine::Utils qw($vre); |
|
15
|
|
|
|
|
26
|
|
|
15
|
|
|
|
|
4650
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub run { |
13
|
136
|
|
|
136
|
1
|
203
|
my ($self, $s) = @_; |
14
|
136
|
100
|
100
|
183
|
|
870
|
if (scalar(@$s) > 1 && (any { $s->[0] eq $_ } qw(use no))) { |
|
183
|
|
|
|
|
1020
|
|
15
|
81
|
100
|
|
|
|
1127
|
return if $s->[1] eq ';'; |
16
|
80
|
|
|
|
|
915
|
my $module = $s->[1]; |
17
|
80
|
|
66
|
|
|
570
|
my ($version) = $s->[2] && $s->[2] =~ $vre; |
18
|
80
|
|
100
|
|
|
1057
|
$version //= ''; |
19
|
80
|
100
|
|
|
|
252
|
return Tangerine::HookData->new( |
20
|
|
|
|
|
|
|
modules => { |
21
|
|
|
|
|
|
|
$module => Tangerine::Occurence->new( |
22
|
|
|
|
|
|
|
version => $version, |
23
|
|
|
|
|
|
|
), |
24
|
|
|
|
|
|
|
}, |
25
|
|
|
|
|
|
|
) unless $module =~ /^v?5(?:\..*)?$/; |
26
|
|
|
|
|
|
|
} |
27
|
56
|
|
|
|
|
923
|
return; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |