Branch Coverage

lib/Archive/Probe.pm
Criterion Covered Total %
branch 85 174 48.8


line true false branch
118 0 4 unless $pattern
119 0 4 unless ref $callback eq 'CODE'
122 2 2 unless ($pattern_map)
159 4 6 if (-d $path) { }
6 0 elsif (-f $path) { }
160 0 4 unless (opendir my $dh, $path)
166 8 8 if $entry eq '.' or $entry eq '..'
173 0 6 if $base eq $path
176 5 1 if ($self->_is_archive_file($path))
178 5 0 if $ctx ne ''
233 0 0 unless defined $recursive
239 0 0 if (-d $path) { }
0 0 elsif ($self->_is_archive_file($path)) { }
242 0 0 unless ($ret)
248 0 0 if $entry eq '.' or $entry eq '..'
250 0 0 if (-d $f) { }
0 0 elsif (-f $f and $self->_is_archive_file($f)) { }
254 0 0 unless $searched_for{$f}
264 0 0 if (index($path, $to_dir) >= 0)
265 0 0 if ($flat) { }
276 0 0 if ($ret and $recursive) { }
0 0 elsif (not $ret) { }
313 2 8 if (defined $value)
331 0 5 if (defined $value)
346 3 1 if ($ctx ne '') { }
350 3 0 if ($do_extract)
356 0 3 unless ($ret)
370 1 0 if ($do_extract)
372 1 0 unless -d $dir2
374 0 1 unless ($ret)
390 4 21 if ($part =~ /$pat/)
399 0 4 unless $dest
402 4 0 if (not defined $$pat_ref[1]) { }
419 4 0 if (ref $$pat_ref[0] eq 'CODE' and defined $$pat_ref[1])
429 1 6 if ($file =~ /\.zip$|\.jar$|\.war$|\.ear$/) { }
0 6 elsif ($file =~ /\.7z$/) { }
2 4 elsif ($file =~ /\.rar$/) { }
2 2 elsif ($file =~ /\.tgz$|\.tar\.gz$|\.tar\.Z$/) { }
1 1 elsif ($file =~ /\.bz2$/) { }
1 0 elsif ($file =~ /\.tar$/) { }
430 0 1 if ($self->_is_cmd_avail('7za')) { }
443 0 0 if $a =~ /^D/
444 0 0 if ($file_pos and $file_pos < length $entry)
484 0 0 if $a =~ /^D/
485 0 0 if ($file_pos_7z and $file_pos_7z < length $entry)
577 3 4 unless ($self->_is_cmd_avail($ar_cmd))
587 0 4 if ($ret != 0)
592 0 4 unless ($ret)
602 0 5 if ($begin_pat)
603 0 0 unless ($file_list_begin)
607 0 0 if (@captures)
619 5 0 if ($ignore_pat)
620 0 5 if /$ignore_pat/
623 0 5 if ($end_pat)
624 0 0 if /$end_pat/
629 0 5 unless $f
631 2 3 if ($self->_is_archive_file($f))
634 2 0 if ($ret) { }
654 4 1 unless -d $extract_dir
656 0 5 if ($parent =~ /\.zip$|\.jar$|\.war$|\.ear$/) { }
0 5 elsif ($parent =~ /\.7z$/) { }
0 5 elsif ($parent =~ /\.rar$/) { }
3 2 elsif ($parent =~ /\.tgz$|\.tar\.gz$|\.tar\.Z$/) { }
1 1 elsif ($parent =~ /\.bz2$/) { }
1 0 elsif ($parent =~ /\.tar$/) { }
657 0 0 if ($self->_is_cmd_avail('7za')) { }
669 0 0 if (not $^O =~ /bsd$/i) { }
682 0 0 if (not $file =~ /[;<>\\\*\|`&\$!#\(\)\[\]\{\}:'"]/) { }
750 0 5 if $self->show_extracting_output
759 0 5 if ($^O eq 'MSWin32')
775 11 8 unless (exists $_CMD_LOC_FOR{$cmd})
779 2 73 if (-f $fp) { }
784 0 73 if ($^O eq 'MSWin32')
787 0 0 if (-f $fp_win)
793 0 0 if (-f $fp_win)
803 4 13 $_CMD_LOC_FOR{$cmd} ? :
813 0 21 if $^O eq 'MSWin32'
815 21 0 unless substr($dir1, -1, 1) eq $path_sep
816 16 5 if (index($path1, $dir1) == 0)
826 19 0 if ($^O ne 'MSWin32') { }
830 0 0 if $ret =~ /[ &#*\|\[\]\(\)\{\}\=;!+,`~']/
844 2 6 if (defined $value)
847 2 0 unless exists $$self{'_properties_with_value'}
865 2 19 if (defined $value)
878 0 1 if $^O eq 'MSWin32'
880 1 0 if ($idx > 0) { }
893 2 2 unless (defined $files)