lib/Perl/PrereqScanner/NotQuiteLite/Parser/Inline.pm

filter: Statementstmt 95.4% 21 / 22 Branchbran 70.0% 7 / 10 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 2 totaltotal 77.2% 34 / 44 SCAR 19.8
CC
7
Cov
83%
parse_inline_args
7.8
BEGIN
1.0
BEGIN
1.0
CRAP 7.2
« lib/Perl/PrereqScanner/NotQuiteLite/Parser/TestClassMost.pm ↑ Summary lib/Perl/PrereqScanner/NotQuiteLite/Parser/TestMore.pm »
1 package Perl::PrereqScanner::NotQuiteLite::Parser::Inline;
2  
3 88 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 88 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 88 ▶use Perl::PrereqScanner::NotQuiteLite::Util;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 sub register { return {
8 87 ▶ use => {
Subroutine register: called CC=1 SCAR=0.0
Pod undocumented
9 Inline => 'parse_inline_args',
10 },
11 }}
12  
13 sub parse_inline_args {
14 7 ▶ my ($class, $c, $used_module, $raw_tokens) = @_;
Subroutine parse_inline_args: called CC=7 SCAR=20.5
Pod undocumented
15  
16 7 my $tokens = convert_string_tokens($raw_tokens);
17  
18 7 ▶ if (is_version($tokens->[0])) {
Branch: 1 branch
BranchTrueFalseTotal
if (is_version($tokens->[0])) 0 7 7
19 0 $c->add($used_module => shift @$tokens);
20 }
21 7 ▶ if (ref $tokens->[0] and is_module_name($tokens->[0][0])) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $tokens->[0] and is_module_name($tokens->[0][0])) 7 0 7
Condition33%1/3
ref $tokens->[0] and is_module_name($tokens->[0][0])
!ll&&!rl&&r
007
MC/DC0%0/2
ref $tokens->[0] and is_module_name($tokens->[0][0])
ref $tokens->[0] is_module_name($tokens->[0][0])
Truth table33%1/3
A and B
A= ref $tokens->[0]B= is_module_name($tokens->[0][0])
ABresult
0X0
100
111
22 7 my $module = (shift @$tokens)->[0];
23 7 ▶ if ($module eq 'with') {
Branch: 2 branches
BranchTrueFalseTotal
if ($module eq 'with') { } 1 6 7
elsif ($module eq 'Config') { } 1 5 6
24 1 $module = $tokens->[1];
25 1 ▶ if (is_module_name($module)) {
Branch: 1 branch
BranchTrueFalseTotal
if (is_module_name($module)) 1 0 1
26 1 $c->add($module => 0);
27 }
28 } elsif ($module eq 'Config') {
29 # Configuration only
30 } else {
31 5 $c->add("Inline::".$module => 0);
32 }
33 }
34 }
35  
36 88 1;
37  
38 __END__
« lib/Perl/PrereqScanner/NotQuiteLite/Parser/TestClassMost.pm ↑ Summary lib/Perl/PrereqScanner/NotQuiteLite/Parser/TestMore.pm »