Branch Coverage

blib/lib/IO/Compress/Zip.pm
Criterion Covered Total %
branch 106 180 58.8


line true false branch
85 2 1 if $method == 0 or $method == 8
91 0 0 if $method == 12 and defined $IO::Compress::Adapter::Bzip2::VERSION and defined &{"IO::Compress::Adapter::Bzip2::mkRawZipCompObject";}
96 0 0 if $method == 14 and defined $IO::Compress::Adapter::Lzma::VERSION and defined &{"IO::Compress::Adapter::Lzma::mkRawZipCompObject";}
101 0 0 if $method == 95 and defined $IO::Compress::Adapter::Xz::VERSION and defined &{"IO::Compress::Adapter::Xz::mkRawZipCompObject";}
106 0 0 if $method == 93 and defined $IO::Compress::Adapter::ZSTD::VERSION and defined &{"IO::Compress::Adapter::ZSTD::mkRawZipCompObject";}
115 0 411 if (*$self->{'ZipData'}{'Sparse'})
128 0 0 if $sparse % $inc
139 36 377 if (*$self->{'ZipData'}{'Method'} == 0) { }
356 21 elsif (*$self->{'ZipData'}{'Method'} == 8) { }
21 0 elsif (*$self->{'ZipData'}{'Method'} == 12) { }
0 0 elsif (*$self->{'ZipData'}{'Method'} == 14) { }
0 0 elsif (*$self->{'ZipData'}{'Method'} == 95) { }
0 0 elsif (*$self->{'ZipData'}{'Method'} == 93) { }
176 0 0 defined $got->getValue('level') ? :
181 0 413 unless defined $obj
184 342 71 unless (defined *$self->{'ZipData'}{'SizesOffset'})
190 321 92 unless defined *$self->{'ZipData'}{'AnyZip64'}
209 341 52 if (*$self->{'ZipData'}{'Method'} == 8) { }
247 2 0 if $dirs[-1] eq ""
2 0 if (@dirs > 0)
248 2 0 defined $file ? :
277 2 410 if length $filename and $param->getValue("canonicalname")
280 3 409 if (defined *$self->{'ZipData'}{'FilterName'})
285 5 407 if ($param->getValue("efs") and $] >= "5.008004")
286 5 0 if (length $filename)
287 1 4 unless utf8::downgrade($filename, 1)
291 0 4 if (length $comment)
292 0 0 unless utf8::downgrade($comment, 1)
309 411 0 if $osCode == 3
312 26 385 if (*$self->{'ZipData'}{'Zip64'})
324 411 0 unless ($param->getValue("minimal"))
325 113 298 if ($param->parsed("mtime"))
334 411 0 if ($osCode == 3)
336 113 298 if ($param->getValue("want_exunixn"))
343 0 411 if ($param->getValue("exunix2"))
350 411 0 if defined $param->getValue("extattr")
353 0 411 if defined $param->getValue("extrafieldlocal")
356 0 411 if defined $param->getValue("extrafieldcentral")
363 346 65 if *$self->{'ZipData'}{'Stream'}
365 0 411 if $method == 14
368 4 0 if $param->getValue("efs") and length $filename || length $comment
373 20 370 if 45 > $version and *$self->{'ZipData'}{'Zip64'}
382 112 299 if $param->getValue("textflag")
400 26 385 if (*$self->{'ZipData'}{'Zip64'}) { }
435 0 411 if (*$self->{'ZipData'}{'LocalHdrOffset'}->is64bit) { }
456 354 57 if (*$self->{'ZipData'}{'Method'} == 8) { }
466 385 26 if (not *$self->{'ZipData'}{'Zip64'}) { }
482 346 65 if (*$self->{'ZipData'}{'Stream'}) { }
487 0 65 unless $self->writeAt(*$self->{'ZipData'}{'LocalHdrOffset'}->get64bit + 14, $crc32)
490 8 57 *$self->{'ZipData'}{'Zip64'} ? :
0 65 unless $self->writeAt(*$self->{'ZipData'}{'SizesOffset'}, *$self->{'ZipData'}{'Zip64'} ? $xtrasize : $sizes)
501 0 411 if (*$self->{'UnCompSize'}->isAlmost64bit) { }
508 0 411 if (*$self->{'CompSize'}->isAlmost64bit) { }
516 0 411 if *$self->{'ZipData'}{'LocalHdrOffset'}->is64bit
523 0 411 if (length $zip64Payload)
555 0 345 if *$self->{'ZipData'}{'Offset'}->is64bit or $entries >= 65535
562 21 324 if (*$self->{'ZipData'}{'AnyZip64'})
575 0 21 if defined *$self->{'ZipData'}{'extrafieldzip64'}
589 0 21 if IO::Compress::Base::Common::isGeMax32($cd_len)
590 0 21 if $entries >= 65535
614 325 89 unless ($got->parsed("time"))
619 0 414 if ($got->parsed("extime"))
621 0 0 if (defined $timeRef)
622 0 0 if ref $timeRef ne "ARRAY" or @$timeRef != 3
634 0 828 if ($got->parsed($name))
636 0 0 if (defined $idRef)
637 0 0 if ref $idRef ne "ARRAY" or @$idRef != 2
647 26 388 if $got->getValue("zip64") or $got->getValue("extrafieldzip64")
654 0 414 unless defined $IO::Compress::Zip::ZIP_CM_MIN_VERSIONS{$method}
656 0 414 if $method == 12 and not defined $IO::Compress::Adapter::Bzip2::VERSION
660 0 414 if $method == 14 and not defined $IO::Compress::Adapter::Lzma::VERSION
671 0 1242 if (defined $data)
673 0 0 if $bad
682 0 414 if defined $IO::Compress::Bzip2::VERSION and not IO::Compress::Bzip2::ckParams($self, $got)
685 0 414 if ($got->parsed("sparse"))
690 3 411 if ($got->parsed("filtername"))
692 3 0 if ref $v eq "CODE"
702 0 399 if *$self->{'ZipData'}{'Sparse'}
777 50 113 if (IO::Compress::Base::Common::isaScalar($filename))
780 0 50 if IO::Compress::Base::Common::isGeMax32(length ${$filename;})
786 0 113 if ($params->parsed('storelinks')) { }
797 108 5 unless $params->parsed("textflag")
800 0 113 if IO::Compress::Base::Common::isGeMax32($size)
803 102 11 unless $params->parsed("name")
806 106 7 unless $params->parsed("time")
809 113 0 unless ($params->parsed("extime"))
818 108 5 unless ($params->parsed("extattr"))
822 0 108 if ($mode & 128) == 0
823 0 108 if ($mode & S_IFMT()) == 16384
844 339 113 if (defined $time)