line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Perl::PrereqScanner::NotQuiteLite::Parser::Only; |
2
|
|
|
|
|
|
|
|
3
|
83
|
|
|
83
|
|
1777
|
use strict; |
|
83
|
|
|
|
|
171
|
|
|
83
|
|
|
|
|
2368
|
|
4
|
83
|
|
|
83
|
|
409
|
use warnings; |
|
83
|
|
|
|
|
176
|
|
|
83
|
|
|
|
|
4222
|
|
5
|
83
|
|
|
83
|
|
464
|
use Perl::PrereqScanner::NotQuiteLite::Util; |
|
83
|
|
|
|
|
1091
|
|
|
83
|
|
|
|
|
23546
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub register { return { |
8
|
82
|
|
|
82
|
0
|
474
|
use => { |
9
|
|
|
|
|
|
|
only => 'parse_only_args', |
10
|
|
|
|
|
|
|
}, |
11
|
|
|
|
|
|
|
}} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub parse_only_args { |
14
|
6
|
|
|
6
|
0
|
17
|
my ($class, $c, $used_module, $raw_tokens) = @_; |
15
|
|
|
|
|
|
|
|
16
|
6
|
|
|
|
|
20
|
my $tokens = convert_string_tokens($raw_tokens); |
17
|
|
|
|
|
|
|
|
18
|
6
|
50
|
|
|
|
20
|
if (is_version($tokens->[0])) { |
19
|
0
|
|
|
|
|
0
|
$c->add($used_module => shift @$tokens); |
20
|
|
|
|
|
|
|
} |
21
|
6
|
|
|
|
|
20
|
while(my $token = shift @$tokens) { |
22
|
9
|
|
|
|
|
22
|
my $module = $token; |
23
|
9
|
100
|
|
|
|
26
|
if (ref $module) { |
24
|
8
|
|
|
|
|
16
|
$module = $module->[0]; |
25
|
|
|
|
|
|
|
} |
26
|
9
|
100
|
|
|
|
21
|
next unless is_module_name($module); |
27
|
5
|
|
|
|
|
13
|
my $version = shift @$tokens; |
28
|
5
|
100
|
|
|
|
15
|
$version = shift @$tokens if ref $version; |
29
|
5
|
100
|
|
|
|
12
|
if (is_version($version)) { |
30
|
3
|
|
|
|
|
11
|
$c->add($module => $version); |
31
|
|
|
|
|
|
|
} else { |
32
|
2
|
|
|
|
|
71
|
$c->add($module => 0); # Can't determine a version |
33
|
|
|
|
|
|
|
} |
34
|
5
|
|
|
|
|
385
|
last; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
__END__ |