line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Perl::PrereqScanner::NotQuiteLite::Parser::Autouse; |
2
|
|
|
|
|
|
|
|
3
|
82
|
|
|
82
|
|
1121
|
use strict; |
|
82
|
|
|
|
|
145
|
|
|
82
|
|
|
|
|
1878
|
|
4
|
82
|
|
|
82
|
|
327
|
use warnings; |
|
82
|
|
|
|
|
136
|
|
|
82
|
|
|
|
|
1611
|
|
5
|
82
|
|
|
82
|
|
312
|
use Perl::PrereqScanner::NotQuiteLite::Util; |
|
82
|
|
|
|
|
150
|
|
|
82
|
|
|
|
|
16304
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub register { return { |
8
|
81
|
|
|
81
|
0
|
355
|
use => { |
9
|
|
|
|
|
|
|
'autouse' => 'parse_autouse_args', |
10
|
|
|
|
|
|
|
}, |
11
|
|
|
|
|
|
|
}} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub parse_autouse_args { |
14
|
2
|
|
|
2
|
0
|
6
|
my ($class, $c, $used_module, $raw_tokens) = @_; |
15
|
|
|
|
|
|
|
|
16
|
2
|
|
|
|
|
8
|
my $tokens = convert_string_tokens($raw_tokens); |
17
|
2
|
50
|
|
|
|
9
|
if (is_version($tokens->[0])) { |
18
|
0
|
|
|
|
|
0
|
$c->add($used_module => shift @$tokens); |
19
|
|
|
|
|
|
|
} |
20
|
2
|
|
|
|
|
6
|
my $module = $tokens->[0]; |
21
|
2
|
50
|
|
|
|
6
|
if (ref $module) { |
22
|
0
|
|
|
|
|
0
|
$module = $module->[0]; |
23
|
|
|
|
|
|
|
} |
24
|
2
|
50
|
|
|
|
6
|
if (is_module_name($module)) { |
25
|
2
|
|
|
|
|
10
|
$c->add_recommendation($module => 0); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
__END__ |