line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Perl::PrereqScanner::NotQuiteLite::Parser::Superclass; |
2
|
|
|
|
|
|
|
|
3
|
82
|
|
|
82
|
|
1095
|
use strict; |
|
82
|
|
|
|
|
140
|
|
|
82
|
|
|
|
|
1787
|
|
4
|
82
|
|
|
82
|
|
315
|
use warnings; |
|
82
|
|
|
|
|
157
|
|
|
82
|
|
|
|
|
1420
|
|
5
|
82
|
|
|
82
|
|
324
|
use Perl::PrereqScanner::NotQuiteLite::Util; |
|
82
|
|
|
|
|
191
|
|
|
82
|
|
|
|
|
20250
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub register { return { |
8
|
81
|
|
|
81
|
0
|
373
|
use => { |
9
|
|
|
|
|
|
|
superclass => 'parse_superclass_args', |
10
|
|
|
|
|
|
|
}, |
11
|
|
|
|
|
|
|
}} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub parse_superclass_args { |
14
|
7
|
|
|
7
|
0
|
15
|
my ($class, $c, $used_module, $raw_tokens) = @_; |
15
|
|
|
|
|
|
|
|
16
|
7
|
|
|
|
|
19
|
my $tokens = convert_string_tokens($raw_tokens); |
17
|
7
|
50
|
|
|
|
18
|
if (is_version($tokens->[0])) { |
18
|
0
|
|
|
|
|
0
|
$c->add($used_module => shift @$tokens); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
7
|
|
|
|
|
9
|
my ($module, $version, $prev); |
22
|
7
|
|
|
|
|
15
|
for my $token (@$tokens) { |
23
|
19
|
50
|
|
|
|
240
|
last if $token eq '-norequire'; |
24
|
19
|
100
|
|
|
|
34
|
if (ref $token) { |
25
|
8
|
50
|
|
|
|
14
|
last if $token->[0] eq '-norequire'; |
26
|
8
|
|
|
|
|
13
|
$prev = $token->[0]; |
27
|
8
|
|
|
|
|
14
|
next; |
28
|
|
|
|
|
|
|
} |
29
|
11
|
|
|
|
|
16
|
$prev = $token; |
30
|
|
|
|
|
|
|
|
31
|
11
|
100
|
|
|
|
22
|
if (is_module_name($token)) { |
32
|
7
|
50
|
|
|
|
15
|
if ($module) { |
33
|
0
|
|
0
|
|
|
0
|
$c->add($module => $version || 0); |
34
|
|
|
|
|
|
|
} |
35
|
7
|
|
|
|
|
11
|
$module = $token; |
36
|
7
|
|
|
|
|
11
|
next; |
37
|
|
|
|
|
|
|
} |
38
|
4
|
50
|
|
|
|
9
|
if (is_version($token)) { |
39
|
4
|
|
|
|
|
11
|
$c->add($module => $token); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
} |
42
|
7
|
50
|
|
|
|
86
|
if ($module) { |
43
|
7
|
|
|
|
|
16
|
$c->add($module => 0); |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
__END__ |