Branch Coverage

blib/lib/Astro/FITS/CFITSIO/Simple/Table.pm
Criterion Covered Total %
branch 94 134 70.1


line true false branch
46 27 0 'HASH' eq ref $_[-1] ? :
53 0 27 if grep {ref $_;} @_
98 0 27 if @del_cols and @del_cols != @req_cols
101 1 26 if @del_cols
113 13 2 unless @req_cols or $opt{'retinfo'}
124 11 16 unless $ninc
125 11 16 if $nrows < $ninc
140 0 147 if "" eq $name
144 0 147 if (exists $cols{$name})
152 0 147 if ($name ne lc $oname)
153 0 0 if (defined(my $item = $hdr->itembyname("TTYPE$coln"))) { }
172 31 116 if exists $del_cols{$name} or @req_cols and not exists $req_cols{$name}
196 10 106 if (exists $user_types{$name} or exists $opt{'defdtype'})
200 2 8 if (TBIT() == $col->{'btype'}) { }
2 6 elsif (not UNIVERSAL::isa($type, 'PDL::Type')) { }
0 6 elsif ($col->{'btype'} == TLOGICAL() or $col->{'btype'} == TSTRING()) { }
202 2 0 if ($type =~ /logical/) { }
0 0 elsif (not UNIVERSAL::isa($type, 'PDL::Type')) { }
0 0 elsif ($type != byte() and $type != ushort() and $type != long()) { }
238 102 12 if (TBIT() != $col->{'btype'} and not defined $col->{'ptype'})
240 0 102 if $@
251 1 113 if (TSTRING() == $col->{'btype'}) { }
264 4 109 if (TBIT() == $col->{'btype'} and not defined $col->{'ctype'} && TBIT() == $col->{'ctype'}) { }
276 103 6 if @{$col->{'naxes'};} == 1 and 1 == $col->{'naxes'}[0]
279 1 108 if ($col->{'btype'} == TLOGICAL()) { }
106 2 elsif (not defined $col->{'ctype'}) { }
309 0 113 if $@
315 76 37 $nrows ? :
329 34 5 $ninc ? :
39 74 unless defined $tmppdl{$col->{'tmpshape'}}
339 113 0 $PDL::Bad::Status ? :
0 113 exists $opt{'nullval'} ? :
344 11 103 if ($opt{'retinfo'})
360 0 25 if @notfound
363 1 24 if keys %user_types
374 12 12 @req_cols ? :
380 2 22 if not wantarray and @cols > 1
387 4 17 if ($nrows and $opt{'rfilter'})
396 0 22 if (defined $opt{'status'})
403 0 0 if $@
407 0 22 if $progress
413 0 258 if $progress and $rows_done >= $next_update
417 237 21 if $rows_this_time > $ninc
420 61 197 if ($opt{'rfilter'})
439 30 31 unless $tmp_ngood > 0
447 0 829 unless $col->{'repeat'}
449 829 0 if (TSTRING() != $col->{'btype'}) { }
463 829 0 if $PDL::Bad::Status
480 4 17 if ($nrows and $opt{'rfilter'})
487 0 4 unless $col->{'repeat'}
489 4 0 if (TSTRING() != $col->{'btype'}) { }
501 0 22 if $progress and $nrows >= $next_update
504 0 22 if $progress
508 3 19 if ($opt{'retinfo'})
518 0 3 if $opt{'rethdr'}
522 10 9 if ($opt{'rethash'})
524 0 10 if $opt{'rethdr'}
529 4 5 if (wantarray)
531 0 4 if $opt{'rethdr'}
537 5 0 if (1 == @cols)
574 4 0 unless (defined $col->{'ptype'})
581 5 3 unless PDL::Core::howbig($type->enum) == $nbytes
594 3 1 if $npiddle == 1
601 0 4 if @{$col->{'naxes'};} == 1 and 1 == $col->{'naxes'}[0]
611 4 0 unless defined $col->{'ctype'}
638 1 3 if ($col->{'tmpnaxes'}[0] > 1) { }
667 0 0 unless not ref $_[0] or &blessed($_[0]) and $_[0]->can("print") and $_[0]->can("flush") or "GLOB" eq ref $_[0]