Branch Coverage

blib/lib/Struct/Path/PerlStyle.pm
Criterion Covered Total %
branch 74 74 100.0


line true false branch
205 57 85 if (not defined $delim) { }
39 46 elsif (not $type and $delim eq '"') { }
11 35 elsif (not $type and $delim eq q[']) { }
33 2 elsif ($delim eq '/' and not $type or $type eq 'm') { }
206 55 2 if $text =~ s/^\s*($HASH_KEY_CHARS+)//
216 3 30 if ($@)
225 4 135 unless defined $token
230 78 57 if ($text ne '')
231 71 7 if ($text =~ s/^,//) { }
232 2 69 if $text eq ''
247 4 26 if $text =~ /^\s*(!\s*|not\s+)*($COMPL_OPS)/
259 9 21 unless ($hook = $SAFE->reval($hook, $HOOK_STRICT))
260 1 8 if ($stderr) { }
280 11 58 $i =~ /^\s*(-?\d+)\s*\.\.\s*(-?\d+)\s*$/ ? :
281 7 73 unless eval { do { $_ == int $_ } }
284 5 57 $range[0] < $range[-1] ? :
295 1 114 unless defined $path
297 4 110 if exists $opts->{'aliases'}
306 171 183 if $step
309 9 171 unless $step
315 74 97 if ($type eq '{') { }
57 40 elsif ($type eq '[') { }
30 10 elsif ($type eq '(') { }
322 2 8 unless exists $Struct::Path::PerlStyle::ALIASES->{$step}
343 1 46 unless ref $path eq 'ARRAY'
350 27 39 if (ref $step eq 'ARRAY') { }
38 1 elsif (ref $step eq 'HASH') { }
353 3 62 unless eval { do { int $i == $i } }
354 30 32 if (@items and $items[-1][0] < $i && $items[-1][-1] == $i - 1 || $items[-1][0] > $i && $items[-1][-1] == $i + 1) { }
366 21 11 abs $_->[0] - $_->[-1] < 2 ? :
374 35 3 if (exists $step->{'K'}) { }
1 2 elsif (keys %{$step;}) { }
376 1 34 unless ref $step->{'K'} eq 'ARRAY'
378 1 33 if keys %{$step;} > 1
387 15 68 if (&is_regexp($k)) { }
66 2 elsif (defined $k and ref $k eq '') { }
395 33 33 unless ($k =~ /^$HASH_KEY_CHARS+$/)