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
87 3 0 if ($file =~ /\.(tgz|tar\.gz)$/) { }
0 0 elsif ($file =~ /\.tar.bz2$/) { }
89 0 3 unless ($fh = 'IO::Zlib'->new($file, 'rb'))
93 0 0 unless ($fh = 'IO::Uncompress::Bunzip2'->new($file))
96 0 0 unless (open $fh, '<', $file)
106 0 3 if ($opts)
108 0 0 if (exists $$opts{"tar_$_"}) { }
0 0 elsif (exists $opts->{$_}) { }
118 0 17 if (my $error = $tar->error)
119 0 0 unless $errors{$error}++
121 0 3 unless (@files or $has_extracted)
126 1 1 if $Archive::Any::Lite::IGNORE_SYMLINK and $file->is_symlink || $file->is_hardlink
128 0 19 unless ($tar->extract_file($file, 'File::Spec'->canonpath($path)))
129 0 0 if (my $error = $tar->error)
130 0 0 unless $errors{$error}++
136 0 3 if %errors
147 0 12 unless my $zip = 'Archive::Zip'->new($file)
153 0 3 unless my $zip = 'Archive::Zip'->new($file)
154 2 1 unless defined $dir
157 1 19 if $Archive::Any::Lite::IGNORE_SYMLINK and $member->isSymbolicLink
160 0 19 if $ret != 0
162 0 3 if $error