Branch Coverage

blib/lib/LibZip/MyArchZip.pm
Criterion Covered Total %
branch 65 146 44.5


line true false branch
82 0 2 if (@_)
95 0 2 unless $fileName
103 0 2 unless ($self->_find_end_centdir($ZIPFL))
107 0 2 unless ($self->_read_end_centdir($ZIPFL))
109 0 2 unless seek $ZIPFL, $eocdPosition - $$self{'centralDirectorySize'}, 0
117 0 6 unless $status
119 2 4 if $signature == END_CENTDIR_SIGN()
121 0 4 unless ($newMember->_readCentralDirectoryFileHeader)
141 1 0 unless ref $member
142 0 1 unless $member
145 0 1 unless (defined $name)
150 1 0 unless -d $dirName
151 0 1 unless -d $dirName
174 0 0 if $status != 0
211 2 0 if $$member{'fileName'} eq $fileName
227 0 6 if ($bytesRead != SIGNATURE_LENGTH())
233 0 2 if ($signature != CENTRAL_DIRECTORY_FILE_HEADER_SIGNATURE() and $signature != LOCAL_FILE_HEADER_SIGNATURE() and $signature != END_CENTDIR_SIGN())
238 0 0 if (-f $$self{'fh'})
254 0 2 unless seek $fh, SIGNATURE_LENGTH(), 1
258 0 2 if ($bytesRead != END_CENTDIR_LENGTH())
285 0 2 if ($fileLength < END_CENTDIR_LENGTH(4))
293 2 0 if $seekOffset > $fileLength
295 0 2 unless seek $fh, -$seekOffset, 2
299 0 2 if ($bytesRead != $seekOffset)
303 0 0 if ($pos >= 0 or $seekOffset == $fileLength or $seekOffset >= $CHUNKSIZE)
306 2 0 if ($pos >= 0) { }
307 0 2 unless seek $fh, $pos - $seekOffset, 1
421 0 4 if ($bytesRead != CENTRAL_DIRECTORY_FILE_HEADER_LENGTH())
434 4 0 if ($fileNameLength)
436 0 4 if ($bytesRead != $fileNameLength)
439 0 4 if ($extraFieldLength)
441 0 0 if ($bytesRead != $extraFieldLength)
444 0 4 if ($fileCommentLength)
446 0 0 if ($bytesRead != $fileCommentLength)
463 6 1 if (defined $newDesiredCompressionMethod)
466 6 0 if ($newDesiredCompressionMethod == COMPRESSION_STORED()) { }
0 0 elsif ($oldDesiredCompressionMethod == COMPRESSION_STORED()) { }
513 0 1 if $self->isEncrypted
533 0 1 if $self->isEncrypted
543 1 0 if $status == 0
562 0 1 if $$self{'uncompressedSize'} == 0
566 1 0 if $$self{'compressionMethod'} == COMPRESSION_STORED()
568 0 1 if ($$self{'compressionMethod'} == COMPRESSION_DEFLATED() and $self->desiredCompressionMethod == COMPRESSION_STORED()) { }
1 0 elsif ($$self{'compressionMethod'} == $self->desiredCompressionMethod) { }
574 0 0 unless $status == 0
586 1 0 $$self{'compressionMethod'} == COMPRESSION_STORED() ? :
601 0 1 unless $status == 0
603 0 1 unless $self->fh
608 0 1 unless seek $$self{'fh'}, $$self{'localHeaderRelativeOffset'} + SIGNATURE_LENGTH(), 0
613 0 1 unless $status == 0
616 0 1 unless seek $$self{'fh'}, $$self{'dataOffset'}, 0
629 0 1 if ($bytesRead != LOCAL_FILE_HEADER_LENGTH())
645 1 0 if ($fileNameLength)
646 0 1 unless seek $$self{'fh'}, $fileNameLength, 1
649 0 1 if ($extraFieldLength)
651 0 0 if ($bytesRead != $extraFieldLength)
667 0 1 if $$self{'uncompressedSize'} == 0
675 0 1 if $status != 0 and $status != 1
677 1 0 if (length $$outRef > 0)
681 0 1 if $status == 1
695 0 1 if ($self->readIsDone)
701 0 1 unless defined $chunkSize
702 1 0 if $chunkSize > $$self{'readDataRemaining'}
707 0 1 unless $status == 0
712 1 0 if ($$self{'compressionMethod'} == COMPRESSION_STORED())
719 1 0 if $self->readIsDone
730 0 1 unless $chunkSize
744 1 1 unless $$self{'fh'}
779 0 0 unless $status == Z_OK()
780 0 0 if ($status == Z_OK() or $status == Z_STREAM_END()) { }
781 0 0 $status == Z_STREAM_END() ? :
798 1 0 if ref $data
800 0 1 if defined &LibZip::MyZlib::crc32