line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Tangerine::hook::use; |
2
|
|
|
|
|
|
|
$Tangerine::hook::use::VERSION = '0.23'; |
3
|
16
|
|
|
16
|
|
861
|
use 5.010; |
|
16
|
|
|
|
|
33
|
|
4
|
16
|
|
|
16
|
|
47
|
use strict; |
|
16
|
|
|
|
|
16
|
|
|
16
|
|
|
|
|
275
|
|
5
|
16
|
|
|
16
|
|
41
|
use warnings; |
|
16
|
|
|
|
|
13
|
|
|
16
|
|
|
|
|
324
|
|
6
|
16
|
|
|
16
|
|
46
|
use parent 'Tangerine::Hook'; |
|
16
|
|
|
|
|
13
|
|
|
16
|
|
|
|
|
52
|
|
7
|
16
|
|
|
16
|
|
668
|
use Tangerine::HookData; |
|
16
|
|
|
|
|
21
|
|
|
16
|
|
|
|
|
241
|
|
8
|
16
|
|
|
16
|
|
45
|
use Tangerine::Occurence; |
|
16
|
|
|
|
|
17
|
|
|
16
|
|
|
|
|
264
|
|
9
|
16
|
|
|
16
|
|
50
|
use Tangerine::Utils qw(any $vre); |
|
16
|
|
|
|
|
13
|
|
|
16
|
|
|
|
|
3559
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub run { |
12
|
142
|
|
|
142
|
1
|
112
|
my ($self, $s) = @_; |
13
|
142
|
100
|
100
|
191
|
|
667
|
if (scalar(@$s) > 1 && (any { $s->[0] eq $_ } qw(use no))) { |
|
191
|
|
|
|
|
567
|
|
14
|
85
|
100
|
|
|
|
643
|
return if $s->[1] eq ';'; |
15
|
84
|
|
|
|
|
484
|
my $module = $s->[1]; |
16
|
84
|
|
66
|
|
|
433
|
my ($version) = $s->[2] && $s->[2] =~ $vre; |
17
|
84
|
|
100
|
|
|
812
|
$version //= ''; |
18
|
84
|
100
|
|
|
|
145
|
return Tangerine::HookData->new( |
19
|
|
|
|
|
|
|
modules => { |
20
|
|
|
|
|
|
|
$module => Tangerine::Occurence->new( |
21
|
|
|
|
|
|
|
version => $version, |
22
|
|
|
|
|
|
|
), |
23
|
|
|
|
|
|
|
}, |
24
|
|
|
|
|
|
|
) unless $module =~ /^v?5(?:\..*)?$/; |
25
|
|
|
|
|
|
|
} |
26
|
58
|
|
|
|
|
492
|
return; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
__END__ |