Branch Coverage

blib/lib/PDL/PP.pm
Criterion Covered Total %
branch 146 382 38.2


line true false branch
147 120 85 if ('PDL::PP::Rule' eq $str) { }
154 60 145 exists $self->{'doc'} ? :
160 0 619 if $main::PP_VERBOSE
182 0 270 if $nargs < 0 or $nargs > 3
185 248 22 unless ref $targets eq 'ARRAY'
188 236 34 if ($#_ != -1)
189 200 36 if (ref $_[-1] eq 'CODE')
195 234 2 if (defined $conditions) { }
196 64 170 unless ref $conditions eq 'ARRAY'
201 58 178 if defined $doc
221 8 218 if (exists $pars->{$target})
245 40 365 if substr($condition, 0, 1) eq '_'
247 61 304 unless (exists $pars->{$condition})
266 8 201 if $self->check_if_targets_exist($pars)
267 61 140 unless $self->check_if_conditions_exist($pars)
306 0 146 unless exists $self->{'ref'}
316 48 98 unless $self->is_valid($pars)
326 0 97 unless $#retval == $#$targets
334 0 109 if exists $pars->{$target}
340 0 109 if (defined $result and $result eq 'DO NOT SET!!') { }
360 0 4 unless @_ == 3
370 0 4 if $self->is_valid($pars)
397 0 50 unless $#$targets == 0
408 0 44 unless exists $self->{'returns.value'}
416 16 28 unless $self->is_valid($pars)
508 16 0 unless (exists $self->{'doc'})
514 0 16 unless $#$targets == 0
530 0 15 unless exists $self->{'insertname.value'}
536 1 14 unless $self->is_valid($pars)
570 15 1 ref $src ? :
589 15 1 ref $src ? :
594 110 0 if defined $syms{$1} or confess("$1 not defined in '${ret}'!")
602 0 32 unless $#_ == 1
608 0 32 if ref $target
609 0 32 if ref $condition
731 0 0 $co->{$_}->need_malloc ? :
732 1 2 $cn ? :
1 2 $which eq 'PRIV' ? :
744 0 10 unless $#_ == 2
751 0 10 if ref $target
752 0 10 if ref $symbol
833 0 2 if $packname =~ m[/]
837 0 2 defined $callpack ? :
865 0 0 if $#_ > -1
887 0 3 if (ref $pm) { }
891 0 0 unless defined $opt->{'At'} and $opt->{'At'} =~ /^(Top|Bot|Middle)$/
907 0 0 if ($cmd =~ /^\s*BOOT\s*$/) { }
973 4 1216 if (/%\{/ or /%}/)
987 0 1 if $PDL::PP::done
989 1 0 $main::DOCUMENTED ? :
991 0 1 if $main::PP_VERBOSE
992 0 1 if nopm()
993 0 1 unless my $fh = 'FileHandle'->new(">$main::PDLPREF.xs")
1071 1 0 unless (nopm())
1073 0 1 unless $main::PDLBEGIN =~ /^\s*$/
1075 0 1 unless $fh = 'FileHandle'->new(">$main::PDLPREF.pm")
1119 0 2 if $main::PP_VERBOSE
1123 0 2 if ($name =~ /\n/)
1127 0 0 if ($fulldoc =~ s/^(\w+)//) { }
0 0 elsif ($fulldoc =~ /=head2 (\w+)/) { }
1143 0 0 if exists $obj{'Dump'} and $obj{'Dump'} and $main::PP_VERBOSE
1146 0 1 unless exists $obj{'FreeFunc'}
1159 1 0 if $obj{'PdlDoc'}
1163 0 1 if $main::PP_VERBOSE
1171 0 0 if (ref $_[0] eq 'HASH') { }
1176 0 0 if ($options and ref $options eq 'HASH' and $options->{'infavor'})
1187 0 0 if $infavor
1244 0 0 if ($string =~ /^$proto_re+$/)
1383 0 0 unless -f $typemap
1385 0 0 unless -T $typemap
1388 0 0 unless open TYPEMAP, $typemap
1394 0 0 if /^\s*#/
1396 0 0 if (/^INPUT\s*$/)
1397 0 0 if (/^OUTPUT\s*$/)
1398 0 0 if (/^TYPEMAP\s*$/)
1399 0 0 if ($mode eq 'Typemap') { }
0 0 elsif (/^\s/) { }
0 0 elsif ($mode eq 'Input') { }
1404 0 0 if /^$/ or /^#/
1405 0 0 unless my($t_type, $kind, $proto) = /^\s*(.*?\S)\s+(\S+)\s*($proto_re*)\s*$/
1410 0 0 unless $proto
1411 0 0 unless &ValidProtoString($proto)
1431 0 0 unless $foundtm
1439 0 0 unless exists $type_kind{$full_type}
1528 1 3 /^\s*$/ ? :
1535 0 3 if (/^\s*([^=]+)\s*=>\s*(\S+)\s*$/) { }
0 3 elsif (/^\s*pdl\s+\*\s*(\w+)$/) { }
1538 0 0 if $main::PP_VERBOSE
1541 0 0 unless defined $dimobjs->{$dim}
1550 0 3 if ($name =~ /$INVALID_OTHERPARS_RE/)
1615 1 0 $affine_ok ? :
1618 0 1 $$pobjs{$pnames->[$_]}{'FlagPhys'} ? :
1619 0 1 if ($PDL::PP::Config{'cc'} eq 'cl')
1620 0 0 if $join_flags eq ''
1635 2 0 unless $pobjs->{$_}{'FlagW'}
1636 0 2 if $pobjs->{$_}{'FlagW'}
1645 1 3 $name eq 'copy' ? :
1647 0 4 $name eq 'foo' ? :
1652 0 4 if ($p2child)
1655 0 0 if ($name eq 'redodims')
1722 0 0 if ($glb) { }
1737 0 1 if ($glb) { }
1764 0 2 $nopdlthread ? :
1800 4 0 $#_ > -1 ? :
1804 0 0 if ($callcopy) { }
1866 0 2 if $pmcode
1870 0 2 if $globalnew
1904 2 0 unless $out{$_} or $outca{$_}
1915 0 2 if ($other{$x}) { }
0 2 elsif ($outca{$x}) { }
1933 2 0 if ($nmaxonstack == $ninout) { }
1942 0 0 if ($other{$x}) { }
0 0 elsif ($tmp{$x} or $outca{$x}) { }
1966 0 2 if ($other{$x}) { }
0 2 elsif ($out{$x} or $tmp{$x} or $outca{$x}) { }
1981 0 2 $bitwise ? :
2039 0 2 if $globalnew
2049 0 2 if exists $parobjs->{$x} and exists $parobjs->{$x}{'FlagOut'}
2126 0 1 unless $bvalflag
2128 0 1 if defined $badcode
2161 1 0 unless ($other{$x} or $out{$x} or $tmp{$x} or $outca{$x})
2162 0 1 if ($add) { }
2175 1 0 if ($add != 0) { }
2178 0 0 if $main::PP_VERBOSE
2181 0 1 if (defined $badflag and $badflag == 0)
2187 0 0 if $main::PP_VERBOSE
2207 0 1 unless $bvalflag
2209 0 1 if (defined $badcode)
2217 0 0 if ($badcode =~ /\$PRIV(bvalflag)/)
2232 0 1 if exists $parobjs->{$x} and exists $parobjs->{$x}{'FlagOut'}
2270 2 0 unless defined $arg
2276 0 0 if (exists $parobjs->{$name})
2277 0 0 if (exists $parobjs->{$name}{'FlagOut'}) { }
0 0 elsif (not exists $parobjs->{$name}{'FlagTemp'}) { }
2289 0 0 if $#in == 0
2290 0 0 if $#out == 0
2292 0 0 if (ref $arg eq 'ARRAY') { }
0 0 elsif (ref $arg eq '') { }
2294 0 0 if ($narg > -1)
2296 0 0 if $narg > 0
2299 0 0 unless $arg
2305 0 0 unless defined $in
2307 0 0 unless defined $out
2369 0 0 if (defined $bflag and $bflag)
2396 0 0 if (defined $bflag and $bflag)
2413 0 0 if $doc eq '' and not defined $doc and $doc == undef
2414 0 2 if $doc =~ /^\s*internal\s*$/i
2417 0 2 unless $bvalflag
2423 0 2 if scalar(@splitRes = split(/ /, $doc, 0)) <= 1
2426 0 2 unless $pars
2429 0 2 if $otherpars
2430 0 2 $otherpars ? :
2433 2 0 if (defined $baddoc)
2462 0 0 if ($rev eq '1') { }
2487 0 2 if ($hasp2child)
2489 0 0 if $ignore->{$child}
2492 0 0 unless $parobjs->{$child}{'FlagCreateAlways'}
2499 0 2 if $ignore->{$_}
2504 0 2 if ($po->{'FlagTyped'}) { }
2507 0 0 if $po->{'FlagTplus'}
2512 0 2 if ($po->{'FlagCreateAlways'}) { }
2519 0 2 if $po->{'FlagCreat'}
2545 0 2 if $hasp2child and $#$gentypes != $ntypes
2548 0 2 if $hasp2child
2554 0 2 if $ignore->{$_} or $po->{'FlagTyped'} or $po->{'FlagCreateAlways'}
2559 0 2 if $po->{'FlagCreat'}
2582 1 1 if $opts->{'ToPtrs'}
2593 1 0 if $opts->{'ToPtrs'}
2605 2 0 if $opts->{'ToPtrs'}
2622 1 0 $havethreading ? :
2634 1 0 $havethreading ? :
2642 1 0 $havethreading ? :
2653 0 1 if ($PDL::PP::Config{'cc'} eq 'cl')
2654 0 0 if $join__parnames eq ''
2655 0 0 if $join__realdims eq ''
2712 0 1 $$pobjs{$pnames->[$_]}{'FlagCreat'} ? :
2775 0 1 if $$pobjs{$pnames->[$_]}{'FlagCreat'}
2794 1 0 unless defined $noPthreadFlag
2798 1 0 $npdls ? :
2807 0 1 if ($$pobjs{$pnames->[$_]}{'FlagCreat'}) { }
2854 0 0 if ($fulldoc =~ /=for sig\n\n Signature: \(([^\n]*)\n/g)
2887 0 0 unless my $sig = extract_signature_from_fulldoc($fulldoc)
2895 0 0 if $switched_to_other_pars and $arg =~ /$pars_re/
2897 0 0 if ($arg =~ /$pars_re/) { }
2906 0 0 if @pars == 0
2927 0 0 unless my $sig = extract_signature_from_fulldoc($fulldoc)
2934 0 0 if @otherpars > 0 and $arg =~ /$pars_re/
2936 0 0 unless ($arg =~ /$pars_re/)
2942 0 0 if @otherpars == 0
3576 0 0 if $main::PP_VERBOSE
3588 0 1 if $main::PP_VERBOSE