line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Perl::PrereqScanner::NotQuiteLite::Parser::MojoBase; |
2
|
|
|
|
|
|
|
|
3
|
83
|
|
|
83
|
|
1400
|
use strict; |
|
83
|
|
|
|
|
251
|
|
|
83
|
|
|
|
|
2323
|
|
4
|
83
|
|
|
83
|
|
406
|
use warnings; |
|
83
|
|
|
|
|
194
|
|
|
83
|
|
|
|
|
2003
|
|
5
|
83
|
|
|
83
|
|
472
|
use Perl::PrereqScanner::NotQuiteLite::Util; |
|
83
|
|
|
|
|
177
|
|
|
83
|
|
|
|
|
28590
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
my @MojoBaseLike = qw/ |
8
|
|
|
|
|
|
|
Mojo::Base |
9
|
|
|
|
|
|
|
Mojo::Weixin::Base Mojo::Webqq::Base |
10
|
|
|
|
|
|
|
Kelp::Base Rethinkdb::Base PMLTQ::Base |
11
|
|
|
|
|
|
|
/; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub register { |
14
|
82
|
|
|
82
|
0
|
401
|
my ($class, %args) = @_; |
15
|
82
|
50
|
|
|
|
205
|
my %mojo_base_like = map {$_ => 1} (@MojoBaseLike, @{$args{mojo_base_like} || []}); |
|
492
|
|
|
|
|
1312
|
|
|
82
|
|
|
|
|
729
|
|
16
|
82
|
|
|
|
|
228
|
my %mapping; |
17
|
82
|
|
|
|
|
319
|
for my $module (keys %mojo_base_like) { |
18
|
492
|
|
|
|
|
979
|
$mapping{use}{$module} = 'parse_mojo_base_args'; |
19
|
|
|
|
|
|
|
} |
20
|
82
|
|
|
|
|
460
|
return \%mapping; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub parse_mojo_base_args { |
24
|
12
|
|
|
12
|
0
|
36
|
my ($class, $c, $used_module, $raw_tokens) = @_; |
25
|
|
|
|
|
|
|
|
26
|
12
|
|
|
|
|
39
|
my $tokens = convert_string_tokens($raw_tokens); |
27
|
12
|
50
|
|
|
|
44
|
if (is_version($tokens->[0])) { |
28
|
0
|
|
|
|
|
0
|
$c->add($used_module => shift @$tokens); |
29
|
|
|
|
|
|
|
} |
30
|
12
|
|
|
|
|
29
|
my $module = $tokens->[0]; |
31
|
12
|
100
|
|
|
|
50
|
if (ref $module) { |
32
|
2
|
|
|
|
|
6
|
$module = $module->[0]; |
33
|
|
|
|
|
|
|
} |
34
|
12
|
100
|
|
|
|
35
|
if (is_module_name($module)) { |
35
|
8
|
|
|
|
|
26
|
$module =~ s|'|::|g; |
36
|
8
|
|
|
|
|
31
|
$c->add($module => 0); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
__END__ |