line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Tangerine::hook::use; |
2
|
|
|
|
|
|
|
$Tangerine::hook::use::VERSION = '0.19'; |
3
|
15
|
|
|
15
|
|
1009
|
use 5.010; |
|
15
|
|
|
|
|
42
|
|
4
|
15
|
|
|
15
|
|
60
|
use strict; |
|
15
|
|
|
|
|
21
|
|
|
15
|
|
|
|
|
287
|
|
5
|
15
|
|
|
15
|
|
55
|
use warnings; |
|
15
|
|
|
|
|
14
|
|
|
15
|
|
|
|
|
369
|
|
6
|
15
|
|
|
15
|
|
63
|
use parent 'Tangerine::Hook'; |
|
15
|
|
|
|
|
18
|
|
|
15
|
|
|
|
|
70
|
|
7
|
15
|
|
|
15
|
|
918
|
use List::MoreUtils qw(any); |
|
15
|
|
|
|
|
24
|
|
|
15
|
|
|
|
|
199
|
|
8
|
15
|
|
|
15
|
|
5689
|
use Tangerine::HookData; |
|
15
|
|
|
|
|
21
|
|
|
15
|
|
|
|
|
308
|
|
9
|
15
|
|
|
15
|
|
58
|
use Tangerine::Occurence; |
|
15
|
|
|
|
|
22
|
|
|
15
|
|
|
|
|
3178
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub run { |
12
|
132
|
|
|
132
|
1
|
155
|
my ($self, $s) = @_; |
13
|
132
|
100
|
100
|
181
|
|
759
|
if (scalar(@$s) > 1 && (any { $s->[0] eq $_ } qw(use no))) { |
|
181
|
|
|
|
|
685
|
|
14
|
79
|
100
|
|
|
|
810
|
return if $s->[1] eq ';'; |
15
|
78
|
|
|
|
|
681
|
my $module = $s->[1]; |
16
|
78
|
|
66
|
|
|
323
|
my ($version) = $s->[2] && $s->[2] =~ /^(\d.*)$/o; |
17
|
78
|
|
100
|
|
|
790
|
$version //= ''; |
18
|
78
|
100
|
|
|
|
165
|
return Tangerine::HookData->new( |
19
|
|
|
|
|
|
|
modules => { |
20
|
|
|
|
|
|
|
$module => Tangerine::Occurence->new( |
21
|
|
|
|
|
|
|
version => $version, |
22
|
|
|
|
|
|
|
), |
23
|
|
|
|
|
|
|
}, |
24
|
|
|
|
|
|
|
) unless $module =~ /^v?5(\..*)?$/; |
25
|
|
|
|
|
|
|
} |
26
|
54
|
|
|
|
|
566
|
return; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
__END__ |