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