Branch Coverage

lib/Archive/Any/Lite.pm
Criterion Covered Total %
branch 31 62 50.0


line true false branch
14 1 10 unless (-f $file)
20 10 0 !ref($opts) ? :
26 3 0 $type && lc $type eq 'zip' || $file =~ /\.(?:zip)$/ ? :
7 3 $type && lc $type eq 'tar' || $file =~ /\.(?:tar|tar\.(?:gz|bz2)|gtar|tgz)$/ ? :
29 0 10 unless ($handler)
35 0 10 ref $opts ? :
59 4 12 grep((!/^\Q$first_dir\E/), @files) ? :
64 4 10 grep({m[^(?:/|(?:\./)*\.\./)];} $self->files) ? :
83 2 1 unless defined $dir
86 3 0 if ($file =~ /\.(tgz|tar\.gz)$/) { }
0 0 elsif ($file =~ /\.tar.bz2$/) { }
88 0 3 unless ($fh = 'IO::Zlib'->new($file, 'rb'))
92 0 0 unless ($fh = 'IO::Uncompress::Bunzip2'->new($file))
95 0 0 unless (open $fh, '<', $file)
105 0 3 if ($opts)
107 0 0 if (exists $$opts{"tar_$_"}) { }
0 0 elsif (exists $$opts{$_}) { }
117 0 17 if (my $error = $tar->error)
118 0 0 unless $errors{$error}++
120 0 3 unless (@files or $has_extracted)
125 1 1 if $Archive::Any::Lite::IGNORE_SYMLINK and $file->is_symlink || $file->is_hardlink
127 0 19 unless ($tar->extract_file($file, 'File::Spec'->canonpath($path)))
128 0 0 if (my $error = $tar->error)
129 0 0 unless $errors{$error}++
135 0 3 if %errors
146 0 12 unless my $zip = 'Archive::Zip'->new($file)
152 0 3 unless my $zip = 'Archive::Zip'->new($file)
153 2 1 unless defined $dir
156 1 19 if $Archive::Any::Lite::IGNORE_SYMLINK and $member->isSymbolicLink
159 0 19 if $ret != 0
161 0 3 if $error