Branch Coverage

blib/lib/PDL/NiceSlice.pm
Criterion Covered Total %
branch 81 120 67.5


line true false branch
11 1 5 if (exists $ENV{'PDL_NICESLICE_ENGINE'})
13 1 0 if (exists $engine_ok{$engine} and $engine_ok{$engine}) { }
0 0 elsif (exists $engine_ok{$engine} and not $engine_ok{$engine}) { }
15 0 1 if $PDL::verbose
17 0 0 if $PDL::verbose
76 6 8 unless $extractor_for{$type}
81 110 2843 if (ref $_) { }
2697 146 elsif ($instr) { }
88 110 146 if (ref $_) { }
120 0 0 unless defined $arg
121 0 0 if ($arg) { }
126 0 4 if $#srcstr < 0
154 22 24 if @partialargs
158 0 144 if $ct == 1000
161 110 34 if @partialargs
185 0 79 if $PDL::NiceSlice::debug
186 8 71 if $arg =~ /^\s*:??\s*$/
188 6 65 if $arg =~ /$prefixpat/
190 8 63 if ($arg =~ /(?
192 0 8 if @args > 3
194 0 8 if not defined $args[0] or $args[0] =~ /^\s*$/
195 0 8 if not defined $args[1] or $args[1] =~ /^\s*$/
196 6 2 if not defined $args[2] or $args[2] =~ /^\s*$/
200 12 51 if $arg =~ s/^\s*\((.*)\)\s*$/$1/
202 0 51 if $arg =~ /^\s*\[/
207 0 51 if $arg =~ s/^\s*\*//
216 0 66 if $PDL::NiceSlice::debug
220 0 66 $txt =~ /^\s*$/s ? :
228 0 66 if $PDL::NiceSlice::debug
245 0 86 if $verbose
251 16 70 if ($prefix =~ /for(?:each)?\b(?:$wspat(?:my|our))?$wspat\$\w+$wspat$/s or $prefix =~ /->\s*\$\w+$/s) { }
268 0 70 if $PDL::NiceSlice::debug
271 0 70 if @mods > 1
274 0 70 if $PDL::NiceSlice::debug
277 14 56 if (@mods) { }
280 0 14 if $PDL::NiceSlice::debug
281 2 12 if @modflags > 1 and grep /\?/, @modflags
284 10 2 if (@modflags) { }
286 2 16 if ($mod1 eq '?') { }
2 14 elsif ($mod1 eq '_') { }
8 6 elsif ($mod1 eq '|') { }
6 0 elsif ($mod1 eq '-') { }
287 0 2 if $seen{$mod1}++
292 0 2 if $seen{$mod1}++
298 2 6 if $seen{$mod1}++
303 0 6 if $seen{$mod1}++
330 6 60 $prefix =~ /->$wspat$/ ? :
342 70 23 $ct > 0 ? :
367 0 40 unless (defined $txt)
373 0 40 if ($PDL::NiceSlice::debug > 1)
398 1 278 if (defined $terminator and /$terminator/)
403 0 278 if (defined $reinstator and /$reinstator/)
406 0 278 if (/^\s*(__END__|__DATA__)\s*$/)
416 1 37 if $off
417 0 38 if $end
422 0 7 if (defined $reinstator and /$reinstator/)
426 0 7 if (defined $terminator and /$terminator/)
436 2 38 if ($@)
439 2 0 unless $err =~ /[$_]/
446 0 38 if ($PDL::NiceSlice::debug > 1)