Condition Coverage

lib/Archive/Tar.pm
Criterion Covered Total %
condition 112 188 59.5


and 2 conditions

line l !l condition
926 260 0 $entry->is_hardlink and !!1

and 3 conditions

line !l l&&!r l&&r condition
287 23 53 7 sub { package Archive::Tar::Constant; use warnings; use strict; $_[0] =~ /^r/ ? 1 : 0;}->($mode) and $magic =~ /^\x42\x5A\x68[\x30-\x39]/
432 0 242 0 length $entry->type and $entry->is_file || $entry->is_longlink
434 0 184 0 $entry->is_file and not $entry->validate
454 159 3 22 $filter and not $entry->name =~ /$filter/
137 3 22 $filter_cb and not &$filter_cb($entry)
494 44 0 0 $skip == 5 and not $entry->is_longlink
44 0 0 $skip == 5 and not $entry->is_longlink and not $entry->is_unknown
0 0 0 $skip == 5 and not $entry->is_longlink and not $entry->is_unknown and not $entry->is_label
549 166 5 20 $filter and not $entry->name =~ /$filter/
146 5 20 $filter_cb and not &$filter_cb($entry)
562 142 0 9 $extract and not $entry->is_longlink
142 0 9 $extract and not $entry->is_longlink and not $entry->is_unknown
0 0 9 $extract and not $entry->is_longlink and not $entry->is_unknown and not $entry->is_label
754 3 94 111 ref $self && defined $self->{'cwd'}
787 3 11 90 ref $self and $self->{'_link_cache'}{$full_path}
842 12 273 0 -e $dir and not -d _
891 0 6 260 length $entry->type and $entry->is_file
926 260 0 0 $entry->is_hardlink and !!1 and $Archive::Tar::EXTRACT_HARDLINK
931 0 0 266 $Archive::Tar::CHOWN and sub { package Archive::Tar::Constant; use warnings; use strict; $^O ne 'MSWin32' if $> == 0 and $^O ne 'MacOS';}->()
0 6 260 $Archive::Tar::CHOWN and sub { package Archive::Tar::Constant; use warnings; use strict; $^O ne 'MSWin32' if $> == 0 and $^O ne 'MacOS';}->() and not -l $full
260 0 0 $entry->is_hardlink && 1 && $Archive::Tar::EXTRACT_HARDLINK
6 0 260 $Archive::Tar::CHOWN and sub { package Archive::Tar::Constant; use warnings; use strict; $^O ne 'MSWin32' if $> == 0 and $^O ne 'MacOS';}->() and not -l $full and not $entry->is_hardlink && 1 && $Archive::Tar::EXTRACT_HARDLINK
938 0 6 260 $Archive::Tar::CHMOD and not -l $full
260 0 0 $entry->is_hardlink && 1 && $Archive::Tar::EXTRACT_HARDLINK
6 0 260 $Archive::Tar::CHMOD and not -l $full and not $entry->is_hardlink && 1 && $Archive::Tar::EXTRACT_HARDLINK
1087 0 0 0 @$aref == 1 and $aref->[0] eq "name"
1133 0 0 0 $Archive::Tar::RESOLVE_SYMLINK =~ /speed/ and @$iterargs == 3
1244 0 0 1 defined $mode and $mode =~ /^[0-7]{1,4}$/
1438 82 1 0 $clone->is_symlink && $Archive::Tar::FOLLOW_SYMLINK
1439 1 12 70 !$clone->is_symlink && $clone->has_content
1866 0 0 33 ref $tarfile and ref $tarfile eq "ARRAY"
2022 0 0 0 @trg and $trg[0] eq ""

or 2 conditions

line l !l condition
52 0 17 eval { do { require IO::String; 'IO::String'->import; 1 } } || 0
209 6 44 shift() || 0
210 10 40 shift() || {}
232 22 71 shift() || 0
346 81 0 shift() || {}
348 34 47 $opts->{'limit'} || 0
350 0 81 $opts->{'md5'} || 0
352 9 72 $opts->{'extract'} || 0
371 81 0 eval { do { tell $handle } } || 'unknown'
652 0 1 $hashmap || {map({$_->full_path, $_;} @{$self->_data;})}
1081 0 38 shift() || []
1350 15 18 shift() || 0
1358 30 0 $self->_get_handle($file, $gzip, sub { package Archive::Tar::Constant; use warnings; $_[0] ? 'wb' . (shift()) : 'w'; } ->($gzip)) || (return)
1407 9 65 length $clone->name > 100 || length $clone->prefix > 155 || 0
1497 0 83 shift() || 0
1535 83 0 $entry->version || '00'
1806 6 3 shift() || 0
1848 1 14 shift() || 0
1849 11 4 shift() || {}
1913 0 3 shift() || 0
1938 6 3 shift() || 0

or 3 conditions

line l !l&&r !l&&!r condition
233 93 0 0 shift() || sub { package Archive::Tar::Constant; use warnings; shift() ? 'rb' : 'r'; } ->(1)
263 12 49 15 $compress or sub { package Archive::Tar::Constant; use warnings; use strict; $_[0] =~ /^r/ ? 1 : 0;}->($mode)
61 0 15 $compress or sub { package Archive::Tar::Constant; use warnings; use strict; $_[0] =~ /^r/ ? 1 : 0;}->($mode) or $magic =~ /^(?:\037\213|\037\235)/
432 184 0 58 $entry->is_file || $entry->is_longlink
454 0 0 140 $entry->name eq "pax_global_header" or $entry->type =~ /^(x|g)$/
549 0 0 151 $entry->name eq "pax_global_header" or $entry->type =~ /^(x|g)$/
576 0 6 15 $entry->is_longlink or $entry->is_dir
735 0 80 208 $vol or "File::Spec"->file_name_is_absolute($dirs)
739 80 0 0 defined $alt or $Archive::Tar::INSECURE_EXTRACT_MODE
761 81 10 117 defined $alt or $Archive::Tar::INSECURE_EXTRACT_MODE
885 0 9 257 -l $full or -e _
926 6 0 260 -l $full or $entry->is_hardlink and !!1 and $Archive::Tar::EXTRACT_HARDLINK
957 0 0 0 $entry->is_blockdev or $entry->is_chardev
1087 38 0 0 @$aref == 0 or @$aref == 1 and $aref->[0] eq "name"
1459 0 70 13 $link_ok or $data_ok
1590 22 0 0 -e $file or -l $file