Condition Coverage

/root/.cpan/build/Imager-1.017-0/blib/lib/Imager.pm
Criterion Covered Total %
condition 191 338 56.5


and 3 conditions

line !l l&&!r l&&r condition
645 32 36 55 not defined $combine and ref $self
664 68 0 8533 $self->{'IMG'} and &Scalar::Util::blessed($self->{'IMG'})
1106 1 0 13 @_ != 1 and not ref $_[0]
1328 0 40 12 $bits and $bits == 64
1592 6 0 4 $input->{'maxbuffer'} and $input->{'maxbuffer'} == 1
1652 85 135 1 $input{'file'} and not $type
1666 219 0 0 $readers{$type} and $readers{$type}{'single'}
1708 0 0 18 $input{'xsize'} and $input{'ysize'}
1855 0 1 7 not $loaded and $error =~ /^Can't locate /
1879 0 1 7 not $loaded and $error =~ /^Can't locate /
1933 0 0 0 $warn_obsolete and $^W
2009 75 0 99 not $type and $input{'file'}
2020 174 0 0 $writers{$type} and $writers{$type}{'single'}
2092 3 0 2 not $type and $opts->{'file'}
2102 1 0 7 ref $img and &Scalar::Util::blessed($img)
1 1 6 ref $img and &Scalar::Util::blessed($img) and $img->isa("Imager")
2119 2 0 0 $writers{$type} and $writers{$type}{'multiple'}
2174 1 3 1 $opts{'file'} and not $type
2188 3 0 0 $readers{$type} and $readers{$type}{'multiple'}
2257 28 0 12 defined $input{$name} and exists $names->{$name}{$input{$name}}
2324 289 71 1 defined $opts{$name} and ref $opts{$name}
2338 1 0 1 defined $width and defined $height
2344 48 3 8 $opts{'xscalefactor'} and $opts{'yscalefactor'}
2361 34 6 19 $opts{'xpixels'} and $opts{'ypixels'}
6 0 19 $opts{'xpixels'} and $opts{'ypixels'} and $opts{'type'}
31 0 0 $opts{'constrain'} and ref $opts{'constrain'}
31 0 0 $opts{'constrain'} and ref $opts{'constrain'} and $opts{'constrain'}->can("constrain")
2557 0 0 0 $opts{'xexpr'} and $opts{'yexpr'}
2694 0 0 28 $channels >= 1 and $channels <= 4
2718 0 1 20 $opts{'src'} and $opts{'src'}->_valid_image("rubthrough")
2788 4 52 0 not defined $width and defined $opts{'src_maxx'}
2794 4 52 0 not defined $height and defined $opts{'src_maxy'}
2843 0 0 143 defined $opts{'dir'} and defined $xlate{$opts{'dir'}}
3077 1 0 1 $opts{'d1'} == 0 and $opts{'d2'} == 361
3092 24 1 8 $opts{'d1'} == 0 and $opts{'d2'} == 361
25 0 8 $opts{'d1'} == 0 and $opts{'d2'} == 361 and $opts{'aa'}
3135 47 2 13 $opts{'d1'} == 0 and $opts{'d2'} == 361
3166 0 0 211 exists $opts{'x1'} and exists $opts{'y1'}
3167 0 0 211 exists $opts{'x2'} and exists $opts{'y2'}
3199 1 0 4 not exists $opts{'points'} and exists $opts{'x'}
0 0 4 not exists $opts{'points'} and exists $opts{'x'} and exists $opts{'y'}
3243 0 0 10 exists $opts{'x'} and exists $opts{'y'}
3358 0 0 0 @{$opts{'x'};} and @{$opts{'x'};} == @{$opts{'y'};}
3380 0 0 89 exists $opts{'x'} and exists $opts{'y'}
3462 49 35 43 ref $color and UNIVERSAL::isa($color, "Imager::Color")
3469 1 1 124 exists $opts{'x'} and exists $opts{'y'}
3534 1 1 236 exists $opts{'x'} and exists $opts{'y'}
3642 151 0 49 ref $opts{'pixels'} and @{$opts{'pixels'};}
4017 0 0 5 $opts{'maps'} and $self->{'IMG'}
4194 0 0 3 defined $max_colors and $max_colors > 0
4227 0 0 5 defined $max_colors and $max_colors > 0
4337 1 9 1 $opts{'sample_size'} and $opts{'sample_size'} eq "float"
4432 119 2 0 not defined $type and $ext =~ /\A[a-zA-Z0-9_]{2,}\z/

or 2 conditions

line l !l condition
422 25 1 $_ = _color($_) or die $ERRSTR . "\n"
925 0 12 delete $hsh{'alpha'} || 0
1051 0 25 $hsh{'maxcolors'} || 256
1831 83 0 $@ || 'Unknown error'
2200 0 1 $opts{'allow_incomplete'} || 0
2357 14 31 $opts{'scalefactor'} || 0.5
2693 1 27 $opts->{'channels'} || 3

or 3 conditions

line l !l&&r !l&&!r condition
618 478 42 139 UNIVERSAL::isa($arg, "Imager::Color") or UNIVERSAL::isa($arg, "Imager::Color::Float")
698 5 1 1266 defined $hsh{'file'} or defined $hsh{'fh'}
6 0 1266 defined $hsh{'file'} or defined $hsh{'fh'} or defined $hsh{'fd'}
1 0 1266 defined $hsh{'file'} or defined $hsh{'fh'} or defined $hsh{'fd'} or defined $hsh{'callback'}
0 0 1266 defined $hsh{'file'} or defined $hsh{'fh'} or defined $hsh{'fd'} or defined $hsh{'callback'} or defined $hsh{'readcb'}
0 8 1258 defined $hsh{'file'} or defined $hsh{'fh'} or defined $hsh{'fd'} or defined $hsh{'callback'} or defined $hsh{'readcb'} or defined $hsh{'data'}
8 0 1258 defined $hsh{'file'} or defined $hsh{'fh'} or defined $hsh{'fd'} or defined $hsh{'callback'} or defined $hsh{'readcb'} or defined $hsh{'data'} or defined $hsh{'io'}
554 0 704 defined $hsh{'xsize'} or defined $hsh{'ysize'}
761 1 26 1 $input{'img'} || $input{'src'}
811 0 0 26 $src_right <= $src_left or $src_bottom < $src_top
901 1 1 43 $l == $r or $t == $b
905 1 1 41 $r < $l or $b < $t
924 6 6 0 delete $hsh{'colors'} || $empty_trim_colors
1002 41 0 0 $opts{'xsize'} || $self->getwidth
1003 41 0 0 $opts{'ysize'} || $self->getheight
1004 0 41 0 $opts{'channels'} || $self->getchannels
1049 24 1 529 $hsh{'type'} eq "paletted" or $hsh{'type'} eq "pseudo"
1270 5 0 9 exists $opts{'start'} || exists $opts{'count'}
1511 8 0 0 $input->{'callback'} or $input->{'readcb'}
1544 0 0 0 $input->{'callback'} || $input->{'readcb'}
1549 8 0 0 $input->{'callback'} || $input->{'readcb'}
1565 2 0 8 $input->{'callback'} or $input->{'writecb'}
1597 2 8 0 $input->{'callback'} || $input->{'writecb'}
1747 3 0 0 defined $opts{'single'} or defined $opts{'multiple'}
1769 3 0 0 defined $opts{'single'} or defined $opts{'multiple'}
1847 214 0 8 $formats_low{$type} or $readers{$type}
1871 168 0 8 $formats_low{$type} or $writers{$type}
2350 0 3 0 $opts{'scalefactor'} || $x_scale
2354 0 3 0 $opts{'scalefactor'} || $y_scale
2364 6 0 1 $opts{'type'} eq "nonprop" or $opts{'type'} eq "non-proportional"
2595 0 0 0 not exists $opts{'xopcodes'} or @{$opts{'xopcodes'};} == 0
2602 0 0 0 defined $OPCODES{$iop} or $iop =~ /^\d+$/
2612 0 0 0 not exists $opts{'yopcodes'} or @{$opts{'yopcodes'};} == 0
2619 0 0 0 defined $OPCODES{$iop} or $iop =~ /^\d+$/
2661 0 25 0 $width ||= $imgs[0]->getwidth
2662 0 25 0 $height ||= $imgs[0]->getheight
2862 0 11 0 defined $opts{'radians'} or defined $opts{'degrees'}
2868 11 5 10 $degrees == 90 or $degrees == 180
16 10 0 $degrees == 90 or $degrees == 180 or $degrees == 270
2887 0 11 0 $opts{'radians'} || $opts{'degrees'} * 3.14159265358979 / 180
2931 0 3 0 $opts{'xsize'} || $self->getwidth
2932 0 3 0 $opts{'ysize'} || $self->getheight
3476 7 2 115 ref $x or ref $y
3542 17 2 217 ref $x or ref $y
3563 3 0 1 $type eq "float" or $type eq "double"
3580 19 2 1 $type eq "float" or $type eq "double"
3868 1 2 11 $opts{'preset'} eq "gray" or $opts{'preset'} eq "grey"
0 0 10 $opts{'preset'} eq "red" or $opts{'preset'} eq "channel0"
0 0 10 $opts{'preset'} eq "green" or $opts{'preset'} eq "channel1"
3 0 7 $opts{'preset'} eq "blue" or $opts{'preset'} eq "channel2"
3885 0 1 0 $self->getchannels == 2 or $self->getchannels == 4
3904 0 0 0 $self->getchannels == 2 or $self->getchannels == 4
4202 0 0 3 $channels == 2 or $channels == 4
4526 0 0 0 $lang eq "C" or $lang eq "CPP"
4583 2 0 0 $_[1] != 1 or $_[0] != 0