Branch Coverage

blib/lib/IO/Compress/Base/Common.pm
Criterion Covered Total %
branch 162 192 84.3


line true false branch
61 5 15 unless (defined $HAS_ENCODE)
68 0 5 $@ ? :
80 0 20 unless &hasEncode()
85 5 15 unless $encoding
100 2170 0 if $needBinmode
108 1018 0 if $needBinmode
158 67 3991 if (defined $got and $got eq "filename" and defined $_[0] and $_[0] eq "-")
173 7 2045 if (defined $got and $got eq "filename" and defined $_[0] and $_[0] eq "-")
185 1792 12498 if &isaFilehandle($_[0])
192 0 12498 if not defined $_[0] and $undef
194 6193 6305 if (ref $_[0])
195 60 6133 if &blessed($_[0])
197 5799 334 if UNIVERSAL::isa($_[0], "SCALAR")
198 290 44 if UNIVERSAL::isa($_[0], "ARRAY") and $extended
199 0 44 if UNIVERSAL::isa($_[0], "HASH") and $hash
200 2 42 if UNIVERSAL::isa($_[0], "CODE") and $wantCode
204 195 6110 if $extended and isaFileGlobString($_[0])
236 30 1483 unless ($inType)
249 30 1453 unless ($outType)
256 15 1438 if ($inType ne "fileglob" and $outType eq "fileglob")
266 35 1403 if ($inType eq "fileglob" and $outType eq "fileglob")
271 15 20 unless ($mapper)
280 45 418 if $inType eq $outType and $_[0] eq $_[1] and $_[0] ne "-"
283 110 1248 if ($inType eq 'fileglob') { }
341 907 elsif ($inType eq 'filename') { }
175 732 elsif ($inType eq 'array') { }
288 0 110 if (@inputs == 0) { }
35 75 elsif (@inputs == 1) { }
295 0 35 unless $obj->validateInputFilenames($inputs[0])
303 0 75 unless $obj->validateInputFilenames(@inputs)
311 30 281 unless $obj->validateInputFilenames($_[0])
317 5 120 unless $obj->validateInputArray($_[0])
322 15 1228 if $outType eq "buffer" and &readonly(${$_[1];})
324 321 907 if ($outType eq "filename")
326 0 321 if not defined $_[1] or $_[1] eq ""
329 156 165 if (-e $_[1])
331 15 141 if (-d _)
364 40 781 if not defined $filename or $filename eq ""
367 0 781 if $filename eq "-"
369 15 766 unless (-e $filename)
374 15 751 if (-d _)
392 5 170 if (@{$_[0];} == 0)
401 20 240 if (not $inType) { }
220 20 elsif ($inType eq 'filename') { }
407 0 210 unless $self->validateInputFilenames($element)
450 6381 0 if $] >= "5.005"
509 1 10 if @_ == 2 and defined $_[1] and UNIVERSAL::isa($_[1], "IO::Compress::Base::Parameters")
513 20 34 unless $p->parse(@_)
534 0 0 if @$v != 2
541 0 0 unless $obj->_checkType($key, \$value, $type, 0, \$x)
575 0 77 @_ ? :
601 1197 4432 if (@_ == 0) { }
20 4412 elsif (@_ == 1) { }
607 15 5 if not defined $href && ref $href or ref $href ne "HASH"
618 0 4412 if $count % 2 != 0
632 74146 3821 if ($firstTime) { }
655 12459 27 if ($got->{$canonkey}) { }
661 1 12458 if $parsed
665 34 12424 unless $self->_checkType($key, $value, $type, 1, \$s)
676 27 5552 if (@Bad)
697 25 12433 if ($type & 1536)
699 1 24 if &readonly($$value)
702 12 12 if (ref $$value) { }
704 11 1 if ref $$value ne "SCALAR"
711 1 11 if ref $value ne "SCALAR"
723 2455 9978 if ($type & 1) { }
447 9531 elsif ($type & 2) { }
77 9454 elsif ($type & 4) { }
9448 6 elsif ($type & 8) { }
1 5 elsif ($type & 16) { }
4 1 elsif ($type & 32) { }
731 4 443 unless defined $value
733 11 432 unless $value =~ /^\d+$/
736 432 0 defined $value ? :
741 1 76 unless defined $value
743 1 75 unless $value =~ /^-?\d+$/
746 75 0 defined $value ? :
751 3 9445 if defined $value and not $value =~ /^\d*$/
754 8297 1148 defined $value && $value != 0 ? :
760 0 1 defined $value ? :
765 1 3 if not defined $value or ref $value ne "CODE"
768 3 0 defined $value ? :
806 1911 389 if defined $value
842 11130 20 if @_ == 1
845 3 17 if @_ == 2
848 17 0 if @_ == 3
903 384 15473 if (ref $value eq 'U64') { }
0 15473 elsif ($value > 4294967295) { }
914 2 15855 if ($value > $available) { }
928 0 787 if ($value > 4294967295)
935 0 787 if ($value > $available) { }
949 2 2 if (ref $value eq "U64")
951 2 0 if ($value->[1])
952 0 2 if $self->[1] == 0 or $value->[1] > $self->[1]
962 3 1 if ($value > $self->[0]) { }
1001 0 3 if ($self->[0] == $other->[0]) { }