Branch Coverage

blib/lib/Perl/MinimumVersion/Fast.pm
Criterion Covered Total %
branch 88 100 88.0


line true false branch
27 1 114 if (ref $stuff ne 'SCALAR') { }
29 0 1 unless open my $fh, "<", $filename
52 30 855 if ($tokens[$i]{'name'} eq "UseDecl" or $tokens[$i]{'name'} eq "RequireDecl")
53 30 0 if (@tokens >= $i + 1)
55 7 23 if ($next_token->{'name'} eq "Double" or $next_token->{'name'} eq "VersionString")
77 3 882 if ($token->{'name'} eq 'ToDo') { }
12 870 elsif ($token->{'name'} eq 'Package') { }
30 840 elsif ($token->{'name'} eq 'UseDecl' or $token->{'name'} eq 'RequireDecl') { }
4 836 elsif ($token->{'name'} eq 'DefaultOperator') { }
1 835 elsif ($token->{'name'} eq 'PolymorphicCompare') { }
1 834 elsif ($token->{'name'} eq 'DefaultEqual') { }
3 831 elsif ($token->{'name'} eq 'GlobalHashVar') { }
4 827 elsif ($token->{'name'} eq 'SpecificValue') { }
10 817 elsif ($token->{'name'} eq 'GlobalArrayVar') { }
8 809 elsif ($token->{'name'} eq 'WhenStmt') { }
81 728 elsif ($token->{'name'} eq 'BuiltinFunc') { }
0 728 elsif ($token->{'name'} eq 'PostDeref' or $token->{'name'} eq 'PostDerefStar') { }
81 10 2 if (@tokens > $i + 2 and $tokens[$i + 1]->name eq "Class")
83 7 3 if ($number->{'name'} eq 'Int' or $number->{'name'} eq 'Double' or $number->{'name'} eq 'VersionString') { }
1 2 elsif ($tokens[$i + 2]{'name'} eq 'LeftBrace') { }
87 3 4 if (@tokens > $i + 3 and $tokens[$i + 3]{'name'} eq "LeftBrace")
95 30 0 if (@tokens >= $i + 1)
98 11 19 if ($next_token->{'data'} eq 'feature') { }
1 18 elsif ($next_token->{'data'} eq 'utf8') { }
99 9 2 if (@tokens > $i + 2) { }
101 8 1 if ($next_token->name eq 'String') { }
104 3 5 if ($arg eq 'fc' or $arg eq 'unicode_eval' or $arg eq 'current_sub') { }
1 4 elsif ($arg eq 'unicode_strings') { }
1 3 elsif ($arg eq 'experimental::lexical_subs') { }
3 0 elsif ($arg =~ /\A:5\.(.*)\z/) { }
128 4 0 if ($token->{'data'} eq "//" and $i >= 1)
130 2 2 unless ($prev_token->name eq "BuiltinFunc" and $prev_token->data =~ /\A(?:split|grep|map)\z/ or $prev_token->name eq "LeftParenthesis")
137 1 0 if ($token->{'data'} eq "~~")
141 1 0 if ($token->{'data'} eq "//=")
145 2 1 if ($token->{'data'} eq "%-" or $token->{'data'} eq "%+")
151 2 2 if ($token->{'data'} eq "\$-" or $token->{'data'} eq "\$+")
155 2 8 if ($token->{'data'} eq "\@-" or $token->{'data'} eq "\@+")
159 3 5 if ($i >= 1 and ($tokens[$i - 1]{'name'} ne 'SemiColon' and $tokens[$i - 1]{'name'} ne 'RightBrace' and $tokens[$i - 1]{'name'} ne 'LeftBrace')) { }
169 8 66 if ($token->data eq "each" or $token->data eq "keys" or $token->data eq "values")
171 15 0 if (@tokens >= $i + 1)
173 6 9 if ($next_token->name eq 'GlobalVar' or $next_token->name eq 'Var') { }
7 2 elsif ($next_token->name eq 'GlobalArrayVar' or $next_token->name eq 'ArrayVar') { }
182 16 46 if ($token->data eq "push" or $token->data eq "unshift" or $token->data eq "pop" or $token->data eq "shift" or $token->data eq "splice")
184 35 0 if (@tokens >= $i + 1)
190 21 14 if ($next_token->name eq "GlobalVar" or $next_token->name eq "Var")
197 1 80 if ($token->data eq "pack" or $token->data eq "unpack")
198 1 0 if (@tokens >= $i + 1 and my $next_token = $tokens[$i + 1])
199 1 0 if ($next_token->{'name'} eq "String" and $next_token->data =~ /[<>]/)
215 3 106 $self->{'minimum_explicit_version'} > $self->{'minimum_syntax_version'} ? :
231 3 105 if (my $explicit = $self->minimum_explicit_version)