Branch Coverage

blib/lib/Convert/BinHex.pm
Criterion Covered Total %
branch 89 148 60.1


line true false branch
171 1 1 $a < $b ? :
278 1 7 unless (defined $crc)
381 0 14 if exists $params{$method}
426 1 0 unless ref $self
430 1 0 if ($params{'FH'}) { }
0 0 elsif ($params{'Expr'}) { }
0 0 elsif ($params{'Data'}) { }
434 0 0 unless $$self{'FH'} = 'FileHandle'->new($params{'Expr'})
439 0 0 if (not ref($data = $params{'Data'})) { }
0 0 elsif (ref $data eq 'ARRAY') { }
447 0 1 unless $$self{'FH'}
487 2 2 @_ > 1 ? :
501 1 3 @_ ? :
513 2 3 @_ > 1 ? :
525 1 1 @_ > 1 ? :
585 1 1 @_ > 1 ? :
601 1 3 @_ ? :
617 2 2 @_ > 1 ? :
628 1 1 @_ > 1 ? :
670 0 1 if $$self{'CommentRead'}
674 1 0 if (/^\(This file must be converted with BinHex ([\d\.]+).*\)\s*$/i)
694 0 1 if $$self{'HeaderRead'}
723 2 4 if (wantarray)
732 1 3 if ($$self{$fork}->length == 0)
736 3 0 unless defined $n
739 1 2 unless (defined $$self{$fork}{'Ptr'})
745 1 2 if $$self{$fork}{'Ptr'} >= $$self{$fork}->length
753 1 1 if ($$self{$fork}{'Ptr'} == $$self{$fork}->length and not defined $$self{$fork}->crc)
758 0 1 if ($$self{'CheckCRC'})
766 0 1 if ($$self{'CheckCRC'} and $$self{$fork}->crc != $comp_CRC)
767 0 0 unless $Convert::BinHex::QUIET
840 0 1 unless $FH->read($READBUF, 4096)
849 0 13 if ($$self{'CheckCRC'})
865 0 13 if $n and length $buf < $n
1069 1 6 if ($eof) { }
1079 5 1 if length $$self{'CBIN'} < 2048
1104 1 1 $$self{'LINE'}++ ? :
1110 2 0 $rem ? :
1117 1 1 if ($eof)
1118 1 0 $$self{'EOL'} ? :
1191 1 0 if defined $_[0]
1223 1 0 defined $_[0] ? :
1224 1 0 if (index($hex, ':') >= 0)
1226 1 0 if ($hex =~ s/:\s*\Z//)
1228 0 1 if $leftover
1234 0 1 $rem ? :
1236 0 1 if $hex eq ''
1278 19 0 defined $_[0] ? :
1279 0 19 if $comp eq ''
1288 30 2829 if (($c = substr($comp, $i, 1)) eq "\220") { }
1290 3 27 unless (length($n = substr($comp, ++$i, 1)))
1295 6 21 ord $n ? :
1376 2 13 if @_
1379 13 2 if defined $$self{'Length'}
1382 1 1 if (defined $$self{'Path'}) { }
1 0 elsif (not ref $$self{'Data'}) { }
0 0 elsif (ref($$self{'Data'} eq 'ARRAY')) { }
1402 0 0 if (@_)
1412 0 0 if (@_)
1422 2 1 @_ ? :
1435 2 0 if $^O or !1
1436 2 0 if $^O or !1
1443 1 1 if (defined $$self{'Path'}) { }
0 1 elsif (not defined $$self{'Data'}) { }
1 0 elsif (not ref $$self{'Data'}) { }
0 0 elsif (ref $$self{'Data'} eq 'ARRAY') { }
1444 0 1 if ($^O || !1 and $$self{'Fork'} eq 'RSRC') { }
1453 0 1 unless open FORK, $$self{'Path'}
1462 0 0 unless $Convert::BinHex::QUIET
1498 0 2 unless $fh
1499 0 2 unless ref $fh
1500 1 1 if ref $fh and not ref($fh) =~ /^(GLOB|FileHandle)$/
1526 0 0 unless defined $scalarref
1537 0 0 unless $$self =~ /\G(.*?\n?)/g