Branch Coverage

blib/lib/PDL/Graphics/Simple.pm
Criterion Covered Total %
branch 48 208 23.0


line true false branch
300 5 3 unless -d (my $dir = "File::Spec"->catdir($path, @d))
301 0 3 unless opendir my $dirfh, $dir
305 8 4 if $found_already{$found_mod}++
311 0 0 unless opendir my $dirfh, $subd
315 0 0 if $found_already{$found_mod}++
437 1 0 unless defined $opt_in
438 0 1 unless ref $opt_in
443 1 0 unless ($opt->{'engine'})
445 1 0 unless ($last_successful_type)
451 0 4 if ($@) { }
455 0 4 $a ? :
458 0 4 if ($a)
463 1 0 unless $last_successful_type
470 0 0 unless (defined $engine and defined $PDL::Graphics::Simple::mods->{$engine})
477 0 0 $ENV{'PDL_SIMPLE_OUTPUT'} ? :
479 0 0 unless ($type)
481 0 0 $output =~ /\.(\w{2,4})$/ ? :
483 0 0 unless ($type =~ /^[fi]/i)
488 0 0 $type eq 'f' ? :
491 0 0 if ($type =~ /^f/i and not $output =~ /\.(\w{2,4})$/)
496 0 0 if (defined $opt->{'multi'})
497 0 0 if (ref $opt->{'multi'} ne "ARRAY" or @{$opt->{'multi'};} != 2)
802 0 0 if $@
803 0 0 unless $data->ndims == 2 or $data->ndims == 3 and $data->dim(2) == 4 || $data->dim(2) == 3 || $data->dim(2) == 1
806 0 0 unless $h and ref $h eq "HASH" and not grep((!$h->{$_}), ("NAXIS", "NAXIS1", "NAXIS2"))
813 0 0 if defined $new_opts{$label}
816 0 0 $h->{$unit} ? :
822 0 0 unless grep defined($_), @{$new_opts{"xrange"};}
823 0 0 unless grep defined($_), @{$new_opts{"yrange"};}
832 1 18 unless @_
833 1 17 if @_ == 1 and ref $_[0] eq "HASH"
835 1 16 if grep((!defined($_)), @_)
850 0 16 if (ref $_[0] eq "HASH" and ref $_[1] eq "HASH")
858 0 16 if $held
865 3 13 if (defined $po->{'bounds'})
867 2 0 if not ref $po->{'bounds'} or ref $po->{'bounds'} ne "ARRAY" or @{$po->{'bounds'};} != 2
870 0 0 unless defined $po->{'bounds'}[$i]
872 0 0 if defined $po->{$r}
880 4 0 if not ref $po->{$r} or ref $po->{$r} ne "ARRAY" or @{$po->{$r};} != 2 or $po->{$r}[0] == $po->{$r}[1]
883 5 0 if (defined $po->{'wedge'})
887 0 5 if (length $po->{'logaxis'})
888 0 0 if ($po->{'logaxis'} =~ /[^xyXY]/)
895 5 0 unless ($po->{'oplot'})
899 0 5 $called_from_imag ? :
911 0 5 if (ref $_[0] eq 'HASH') { }
930 1 4 unless defined $ptn and defined $PDL::Graphics::Simple::plot_types->{$ptn}
932 0 4 if ($co2{'key'} and not defined $po->{'legend'})
936 4 0 unless ($ptn eq "labels")
960 0 4 if ($ptn eq 'labels') { }
961 0 0 if ref $args[-1] ne "ARRAY"
971 2 2 unless grep((@args == $_), @{$$pt{"args"};})
973 0 2 if ($ptn eq 'contours' and @args == 1) { }
1 1 elsif ($ptn eq 'polylines' and @args == 1) { }
1 0 elsif (defined $pt->{'args'}[1]) { }
977 1 0 if $args[0]->dim(0) != 3
982 1 0 if $args[0]->ndims < $pt->{'ndims'}[0]
983 0 0 if ($pt->{'args'}[1] - @args == 2)
987 0 0 if ($pt->{'args'}[1] - @args == 1)
992 0 0 if ($ptn eq 'contours') { }
0 0 elsif ($ptn eq 'polylines') { }
993 0 0 unless $args[0]->ndims == 2 and $args[1]->ndims == 1
997 0 0 unless $args[0]->ndims == 2 and $args[1]->ndims == 1
1006 0 0 ref $_ eq 'ARRAY' ? :
1009 0 0 unless ($dims == 1 | $dims == $dmax)->all
1015 0 0 if $dims->dim(0) != $pt->{'ndims'}[0] and !defined($pt->{'ndims'}[1]) || $dims->dim(0) != $pt->{'ndims'}[1]
1017 0 0 if (@args > 1)
1021 0 0 if ($args[0]->dims > 1)
1035 0 0 if ($po->{'logaxis'} =~ /$re/)
1036 0 0 if ($minmax[1] > 0) { }
1037 0 0 if $minmax[0] <= 0
1042 0 0 if defined $minmax[0] and !defined($var->[0]) || $minmax[0] < $var->[0]
1044 0 0 if defined $minmax[1] and !defined($var->[1]) || $minmax[1] > $var->[1]
1063 0 0 unless $defined_range_vals
1064 0 0 if $defined_range_vals < 2
1065 0 0 if ($po->{$r}[0] == $po->{$r}[1])
1074 0 0 if $po->{$r}[0] <= 0 or $po->{$r}[1] <= 0
1082 0 0 if $obj->{'params'}{'multi'} and $args[1]{'oplot'}
1104 0 0 if ref $_[-1] ne "HASH"
1143 0 0 if @args < 1
1144 0 0 if (ref $args[0] eq 'HASH') { }
1145 0 0 if (ref $args[1] eq 'HASH') { }
1182 0 0 unless (ref $_[0] eq "HASH")
1184 0 0 unless (ref $_[0] eq "HASH")
1189 0 0 unless (ref $_[$#_] eq "HASH")
1219 0 0 if (defined $me)
1222 0 0 if (defined $global_object)
1246 0 0 if (defined $me and UNIVERSAL::isa($me, 'PDL::Graphics::Simple')) { }
0 0 elsif (defined $global_object) { }
1274 0 0 if (defined $me and UNIVERSAL::isa($me, 'PDL::Graphics::Simple')) { }
0 0 elsif (defined $global_object) { }
1288 0 0 if UNIVERSAL::isa($_[0], "PDL::Graphics::Simple")
1289 0 0 if defined $global_object
1327 0 0 unless $PDL::Graphics::Simple::units->{$unit}
1329 0 0 ref $size ? :
1334 0 0 unless @{$size;}
1335 0 0 if @{$size;} == 1
1336 0 0 if @{$size;} == 2
1337 0 0 if @{$size;} > 3
1338 0 0 unless $PDL::Graphics::Simple::units->{$unit}
1339 0 0 unless $size->[0] > 0 and $size->[1] > 0
1362 82 6 if @{$ab{$k};} == 1
1415 0 4 unless defined $module
1418 0 16 unless defined $mod->{$_}
1421 0 4 unless $mod->{'pgs_api_version'} eq $API_VERSION