line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Tangerine::hook::moduleload; |
2
|
|
|
|
|
|
|
$Tangerine::hook::moduleload::VERSION = '0.23'; |
3
|
16
|
|
|
16
|
|
838
|
use strict; |
|
16
|
|
|
|
|
19
|
|
|
16
|
|
|
|
|
330
|
|
4
|
16
|
|
|
16
|
|
46
|
use warnings; |
|
16
|
|
|
|
|
15
|
|
|
16
|
|
|
|
|
295
|
|
5
|
16
|
|
|
16
|
|
42
|
use parent 'Tangerine::Hook'; |
|
16
|
|
|
|
|
16
|
|
|
16
|
|
|
|
|
54
|
|
6
|
16
|
|
|
16
|
|
618
|
use Tangerine::HookData; |
|
16
|
|
|
|
|
14
|
|
|
16
|
|
|
|
|
233
|
|
7
|
16
|
|
|
16
|
|
42
|
use Tangerine::Utils qw(any stripquotelike); |
|
16
|
|
|
|
|
22
|
|
|
16
|
|
|
|
|
2897
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub run { |
10
|
149
|
|
|
149
|
1
|
125
|
my ($self, $s) = @_; |
11
|
149
|
|
|
|
|
210
|
my @routines = qw(load autoload load_remote autoload_remote); |
12
|
149
|
100
|
66
|
211
|
|
325
|
if ((any { $s->[0] eq $_ } qw(use no)) && scalar(@$s) > 1 && |
|
211
|
|
100
|
|
|
678
|
|
13
|
|
|
|
|
|
|
$s->[1] eq 'Module::Load') { |
14
|
2
|
|
|
|
|
39
|
return Tangerine::HookData->new( hooks => [ |
15
|
|
|
|
|
|
|
Tangerine::hook::moduleload->new(type => 'runtime') ] ); |
16
|
|
|
|
|
|
|
} |
17
|
147
|
100
|
100
|
31
|
|
1795
|
if ($self->type eq 'runtime' && (any { $s->[0] eq $_ } @routines) && |
|
31
|
|
66
|
|
|
63
|
|
18
|
|
|
|
|
|
|
scalar(@$s) > 2) |
19
|
|
|
|
|
|
|
{ |
20
|
5
|
|
|
|
|
51
|
return Tangerine::HookData->new( |
21
|
|
|
|
|
|
|
children => [ 'use', stripquotelike($s->[1]), @$s[2..$#$s] ], |
22
|
|
|
|
|
|
|
type => 'runtime', |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
} |
25
|
142
|
|
|
|
|
334
|
return; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
__END__ |