« blib/lib/Perl/PrereqScanner/NotQuiteLite/Parser/ClassAccessor.pm
↑ Summary
lib/Perl/PrereqScanner/NotQuiteLite/Parser/MooseXDeclare.pm »
| 1 | package Perl::PrereqScanner::NotQuiteLite::Parser::Core; | ||||||||||||||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||||||||||||||
| 3 | 91 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||
| 4 | 91 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||
| 5 | 91 | ▶ | use Perl::PrereqScanner::NotQuiteLite::Util; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||||||||||||||||||||
| 7 | 91 | my %feature_since = ( | |||||||||||||||||||||||||||||||||||||||||||||
| 8 | say => '5.010', | ||||||||||||||||||||||||||||||||||||||||||||||
| 9 | state => '5.010', | ||||||||||||||||||||||||||||||||||||||||||||||
| 10 | switch => '5.010', | ||||||||||||||||||||||||||||||||||||||||||||||
| 11 | unicode_strings => '5.012', | ||||||||||||||||||||||||||||||||||||||||||||||
| 12 | current_sub => '5.016', | ||||||||||||||||||||||||||||||||||||||||||||||
| 13 | evalbytes => '5.016', | ||||||||||||||||||||||||||||||||||||||||||||||
| 14 | fc => '5.016', | ||||||||||||||||||||||||||||||||||||||||||||||
| 15 | arybase => '5.016', | ||||||||||||||||||||||||||||||||||||||||||||||
| 16 | unicode_eval => '5.016', | ||||||||||||||||||||||||||||||||||||||||||||||
| 17 | lexical_subs => '5.018', | ||||||||||||||||||||||||||||||||||||||||||||||
| 18 | postderef => '5.020', | ||||||||||||||||||||||||||||||||||||||||||||||
| 19 | postderef_qq => '5.020', | ||||||||||||||||||||||||||||||||||||||||||||||
| 20 | signatures => '5.020', | ||||||||||||||||||||||||||||||||||||||||||||||
| 21 | bitwise => '5.022', | ||||||||||||||||||||||||||||||||||||||||||||||
| 22 | refaliasing => '5.022', | ||||||||||||||||||||||||||||||||||||||||||||||
| 23 | declared_refs => '5.026', | ||||||||||||||||||||||||||||||||||||||||||||||
| 24 | ); | ||||||||||||||||||||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||||||||||||||||||||
| 26 | sub register { return { | ||||||||||||||||||||||||||||||||||||||||||||||
| 27 | 90 | ▶ | use => { | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
register: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 28 | if => 'parse_if_args', | ||||||||||||||||||||||||||||||||||||||||||||||
| 29 | base => 'parse_base_args', | ||||||||||||||||||||||||||||||||||||||||||||||
| 30 | parent => 'parse_parent_args', | ||||||||||||||||||||||||||||||||||||||||||||||
| 31 | feature => 'parse_feature_args', | ||||||||||||||||||||||||||||||||||||||||||||||
| 32 | }, | ||||||||||||||||||||||||||||||||||||||||||||||
| 33 | keyword => { | ||||||||||||||||||||||||||||||||||||||||||||||
| 34 | package => 'parse_package', | ||||||||||||||||||||||||||||||||||||||||||||||
| 35 | exit => 'parse_begin_exit', | ||||||||||||||||||||||||||||||||||||||||||||||
| 36 | }, | ||||||||||||||||||||||||||||||||||||||||||||||
| 37 | }} | ||||||||||||||||||||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||||||||||||||||||||
| 39 | sub parse_if_args { | ||||||||||||||||||||||||||||||||||||||||||||||
| 40 | 9 | ▶ | my ($class, $c, $used_module, $raw_tokens) = @_; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
parse_if_args: called CC=8 SCAR=22.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||||||||||||||||||||
| 42 | 9 | ▶ | while(my $token = shift @$raw_tokens) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 43 | 20 | ▶ | last if $token->[1] eq 'COMMA'; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 44 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||||||||||||||||||||
| 46 | 9 | my $tokens = convert_string_tokens($raw_tokens); | |||||||||||||||||||||||||||||||||||||||||||||
| 47 | 9 | my $module = shift @$tokens; | |||||||||||||||||||||||||||||||||||||||||||||
| 48 | 9 | ▶ | if (ref $module and ($module->[1] eq 'WORD' or $module->[1] eq 'KEYWORD')) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%4/6
ref $module and $module->[1] eq "WORD" || $module->[1] eq "KEYWORD"
$module->[1] eq "WORD" or $module->[1] eq "KEYWORD"
MC/DC33%1/3
ref $module and $module->[1] eq "WORD" || $module->[1] eq "KEYWORD"
ref $module
$module->[1] eq "WORD"
$module->[1] eq "KEYWORD"
Truth table50%2/4
A and B or C
A= ref $moduleB= $module->[1] eq "WORD"C= $module->[1] eq "KEYWORD"
| |||||||||||||||||||||||||||||||||||||||||||||||
| 49 | 4 | $module = $module->[0]; | |||||||||||||||||||||||||||||||||||||||||||||
| 50 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 51 | 9 | ▶ | if (is_module_name($module)) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 52 | 9 | ▶ | if (is_version($tokens->[0])) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 53 | 0 | my $version = shift @$tokens; | |||||||||||||||||||||||||||||||||||||||||||||
| 54 | 0 | $c->add_recommendation($module => $version); | |||||||||||||||||||||||||||||||||||||||||||||
| 55 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||
| 56 | 9 | $c->add_recommendation($module => 0); | |||||||||||||||||||||||||||||||||||||||||||||
| 57 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 58 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||
| 59 | 0 | push @{$c->{errors}}, "use if module not found"; | |||||||||||||||||||||||||||||||||||||||||||||
| 60 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 61 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||||||||||||||||||||
| 63 | sub parse_base_args { | ||||||||||||||||||||||||||||||||||||||||||||||
| 64 | 24 | ▶ | my ($class, $c, $used_module, $raw_tokens) = @_; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
parse_base_args: called CC=13 SCAR=26.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||||||||||||||||||||
| 66 | 24 | my $tokens = convert_string_tokens($raw_tokens); | |||||||||||||||||||||||||||||||||||||||||||||
| 67 | 24 | ▶ | if (is_version($tokens->[0])) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 68 | 0 | $c->add($used_module => shift @$tokens); | |||||||||||||||||||||||||||||||||||||||||||||
| 69 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 70 | 24 | ▶ | while(my $token = shift @$tokens) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 71 | 57 | my $module = $token; | |||||||||||||||||||||||||||||||||||||||||||||
| 72 | 57 | ▶ | if (ref $module and ($module->[1] || '') eq 'WORD') { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%5/5
ref $module and ($module->[1] || "") eq "WORD"
$module->[1] || ''
MC/DC100%2/2
ref $module and ($module->[1] || "") eq "WORD"
ref $module
$module->[1]
Truth table100%3/3
A and B
A= ref $moduleB= $module->[1]
| |||||||||||||||||||||||||||||||||||||||||||||||
| 73 | # allow bareword, but disallow function() | ||||||||||||||||||||||||||||||||||||||||||||||
| 74 | 2 | $module = $module->[0]; | |||||||||||||||||||||||||||||||||||||||||||||
| 75 | 2 | ▶ | next if @$tokens and ref $tokens->[0] and ($tokens->[0][1] || '') eq '()'; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition50%4/8
@$tokens and ref $tokens->[0] and ($tokens->[0][1] || "") eq "()"
@$tokens and ref $tokens->[0]
$tokens->[0][1] || ''
MC/DC0%0/3
@$tokens and ref $tokens->[0] and ($tokens->[0][1] || "") eq "()"
@$tokens
ref $tokens->[0]
$tokens->[0][1]
Truth table25%1/4
A and B and C
A= @$tokensB= ref $tokens->[0]C= $tokens->[0][1]
| |||||||||||||||||||||||||||||||||||||||||||||||
| 76 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 77 | # bareword in parentheses | ||||||||||||||||||||||||||||||||||||||||||||||
| 78 | 56 | ▶ | if (ref $module and ref $module->[0]) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
ref $module and ref $module->[0]
MC/DC100%2/2
ref $module and ref $module->[0]
ref $module
ref $module->[0]
Truth table100%3/3
A and B
A= ref $moduleB= ref $module->[0]
| |||||||||||||||||||||||||||||||||||||||||||||||
| 79 | 3 | $module = $module->[0][0]; | |||||||||||||||||||||||||||||||||||||||||||||
| 80 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 81 | 56 | ▶ | if (is_module_name($module)) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 82 | 28 | $c->add($module => 0); | |||||||||||||||||||||||||||||||||||||||||||||
| 83 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 84 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 85 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 86 | |||||||||||||||||||||||||||||||||||||||||||||||
| 87 | sub parse_parent_args { | ||||||||||||||||||||||||||||||||||||||||||||||
| 88 | 28 | ▶ | my ($class, $c, $used_module, $raw_tokens) = @_; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
parse_parent_args: called CC=16 SCAR=28.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 89 | |||||||||||||||||||||||||||||||||||||||||||||||
| 90 | 28 | my $tokens = convert_string_tokens($raw_tokens); | |||||||||||||||||||||||||||||||||||||||||||||
| 91 | 28 | ▶ | if (is_version($tokens->[0])) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 92 | 0 | $c->add($used_module => shift @$tokens); | |||||||||||||||||||||||||||||||||||||||||||||
| 93 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 94 | 28 | ▶ | while(my $token = shift @$tokens) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 95 | 54 | ▶ | last if $token eq '-norequire'; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 96 | 52 | my $module = $token; | |||||||||||||||||||||||||||||||||||||||||||||
| 97 | 52 | ▶ | if (ref $token) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 98 | 31 | ▶ | last if $token->[0] eq '-norequire'; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 99 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 100 | 47 | ▶ | if (ref $module and ($module->[1] || '') eq 'WORD') { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%5/5
ref $module and ($module->[1] || "") eq "WORD"
$module->[1] || ''
MC/DC100%2/2
ref $module and ($module->[1] || "") eq "WORD"
ref $module
$module->[1]
Truth table100%3/3
A and B
A= ref $moduleB= $module->[1]
| |||||||||||||||||||||||||||||||||||||||||||||||
| 101 | # allow bareword, but disallow function() | ||||||||||||||||||||||||||||||||||||||||||||||
| 102 | 2 | $module = $module->[0]; | |||||||||||||||||||||||||||||||||||||||||||||
| 103 | 2 | ▶ | next if @$tokens and ref $tokens->[0] and ($tokens->[0][1] || '') eq '()'; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition50%4/8
@$tokens and ref $tokens->[0] and ($tokens->[0][1] || "") eq "()"
@$tokens and ref $tokens->[0]
$tokens->[0][1] || ''
MC/DC0%0/3
@$tokens and ref $tokens->[0] and ($tokens->[0][1] || "") eq "()"
@$tokens
ref $tokens->[0]
$tokens->[0][1]
Truth table25%1/4
A and B and C
A= @$tokensB= ref $tokens->[0]C= $tokens->[0][1]
| |||||||||||||||||||||||||||||||||||||||||||||||
| 104 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 105 | # bareword in parentheses | ||||||||||||||||||||||||||||||||||||||||||||||
| 106 | 46 | ▶ | if (ref $module and ref $module->[0]) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
ref $module and ref $module->[0]
MC/DC100%2/2
ref $module and ref $module->[0]
ref $module
ref $module->[0]
Truth table100%3/3
A and B
A= ref $moduleB= ref $module->[0]
| |||||||||||||||||||||||||||||||||||||||||||||||
| 107 | 3 | $module = $module->[0][0]; | |||||||||||||||||||||||||||||||||||||||||||||
| 108 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 109 | 46 | ▶ | $c->add($module => 0) if is_module_name($module); | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 110 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 111 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 112 | |||||||||||||||||||||||||||||||||||||||||||||||
| 113 | sub parse_feature_args { | ||||||||||||||||||||||||||||||||||||||||||||||
| 114 | 10 | ▶ | my ($class, $c, $used_module, $raw_tokens) = @_; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
parse_feature_args: called CC=6 SCAR=18.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 115 | |||||||||||||||||||||||||||||||||||||||||||||||
| 116 | 10 | $c->add_perl('5.010', 'feature'); | |||||||||||||||||||||||||||||||||||||||||||||
| 117 | 10 | my $tokens = convert_string_tokens($raw_tokens); | |||||||||||||||||||||||||||||||||||||||||||||
| 118 | 10 | ▶ | if (is_version($tokens->[0])) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 119 | 0 | $c->add($used_module => shift @$tokens); | |||||||||||||||||||||||||||||||||||||||||||||
| 120 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 121 | 10 | ▶ | while(my $token = shift @$tokens) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 122 | 19 | ▶ | next if ref $token; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 123 | 9 | ▶ | if (exists $feature_since{$token}) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 124 | 5 | $c->add_perl($feature_since{$token} => "feature $token"); | |||||||||||||||||||||||||||||||||||||||||||||
| 125 | 5 | next; | |||||||||||||||||||||||||||||||||||||||||||||
| 126 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 127 | 4 | ▶ | if ($token =~ /^:5\.([0-9]+)(\.\[0-9]+)?/) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 128 | 4 | my $version = sprintf '5.%03d', $1; | |||||||||||||||||||||||||||||||||||||||||||||
| 129 | 4 | $c->add_perl($version, $token); | |||||||||||||||||||||||||||||||||||||||||||||
| 130 | 4 | next; | |||||||||||||||||||||||||||||||||||||||||||||
| 131 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 132 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 133 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 134 | |||||||||||||||||||||||||||||||||||||||||||||||
| 135 | sub parse_begin_exit { | ||||||||||||||||||||||||||||||||||||||||||||||
| 136 | 8 | ▶ | my ($class, $c, $raw_tokens) = @_; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
parse_begin_exit: called CC=7 SCAR=19.6
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 137 | |||||||||||||||||||||||||||||||||||||||||||||||
| 138 | 8 | ▶ | my @stack = @{$c->{stack} || []}; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 139 | 8 | ▶ | if (grep {$_->[0] eq '{' and $_->[2] eq 'BEGIN'} @stack) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||
| 140 | 4 | ▶ | if (grep {$c->token_is_conditional($_->[0])} @$raw_tokens) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||
| 141 | 1 | $c->{force_cond} = 1; | |||||||||||||||||||||||||||||||||||||||||||||
| 142 | 4 | ▶ | } elsif (grep {$_->[0] eq '{' and $c->token_is_conditional($_->[2])} @stack) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 143 | 1 | $c->{force_cond} = 1; | |||||||||||||||||||||||||||||||||||||||||||||
| 144 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||
| 145 | 2 | $c->{ended} = 1; | |||||||||||||||||||||||||||||||||||||||||||||
| 146 | 2 | @{$c->{stack}} = (); | |||||||||||||||||||||||||||||||||||||||||||||
| 147 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 148 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 149 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 150 | |||||||||||||||||||||||||||||||||||||||||||||||
| 151 | sub parse_package { | ||||||||||||||||||||||||||||||||||||||||||||||
| 152 | 32 | ▶ | my ($class, $c, $raw_tokens) = @_; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
parse_package: called CC=9 SCAR=22.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 153 | |||||||||||||||||||||||||||||||||||||||||||||||
| 154 | 32 | my $tokens = convert_string_tokens($raw_tokens); | |||||||||||||||||||||||||||||||||||||||||||||
| 155 | 32 | shift @$tokens; # drop "package" | |||||||||||||||||||||||||||||||||||||||||||||
| 156 | 32 | my $token = shift @$tokens; | |||||||||||||||||||||||||||||||||||||||||||||
| 157 | 32 | ▶ | if (ref $token && $token->[1] && $token->[1] eq 'WORD') { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition50%3/6
ref $token and $token->[1] and $token->[1] eq "WORD"
ref $token and $token->[1]
MC/DC33%1/3
ref $token and $token->[1] and $token->[1] eq "WORD"
ref $token
$token->[1]
$token->[1] eq "WORD"
Truth table50%2/4
A and B and C
A= ref $tokenB= $token->[1]C= $token->[1] eq "WORD"
| |||||||||||||||||||||||||||||||||||||||||||||||
| 158 | 31 | $c->add_package($token->[0]); | |||||||||||||||||||||||||||||||||||||||||||||
| 159 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 160 | 32 | ▶ | if (@$tokens) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 161 | 32 | $token = shift @$tokens; | |||||||||||||||||||||||||||||||||||||||||||||
| 162 | 32 | ▶ | if (is_version($token)) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 163 | 5 | $c->add_perl("5.012", "package PACKAGE VERSION"); | |||||||||||||||||||||||||||||||||||||||||||||
| 164 | 5 | $token = shift @$tokens; | |||||||||||||||||||||||||||||||||||||||||||||
| 165 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 166 | 32 | ▶ | if (ref $token && $token->[1] && $token->[1] =~ /^\{/) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition50%3/6
ref $token and $token->[1] and $token->[1] =~ /^\{/
ref $token and $token->[1]
MC/DC33%1/3
ref $token and $token->[1] and $token->[1] =~ /^\{/
ref $token
$token->[1]
$token->[1] =~ /^\{/
Truth table50%2/4
A and B and C
A= ref $tokenB= $token->[1]C= $token->[1] =~ /^\{/
| |||||||||||||||||||||||||||||||||||||||||||||||
| 167 | 6 | $c->add_perl("5.014", "package PACKAGE (VERSION) {}"); | |||||||||||||||||||||||||||||||||||||||||||||
| 168 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 169 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 170 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 171 | |||||||||||||||||||||||||||||||||||||||||||||||
| 172 | 91 | 1; | |||||||||||||||||||||||||||||||||||||||||||||
| 173 | |||||||||||||||||||||||||||||||||||||||||||||||
| 174 | __END__ | ||||||||||||||||||||||||||||||||||||||||||||||