Condition Coverage

lib/Archive/Tar.pm
Criterion Covered Total %
condition 113 191 59.1


and 2 conditions

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

and 3 conditions

line !l l&&!r l&&r condition
288 23 53 7 sub { package Archive::Tar::Constant; use warnings; use strict; $_[0] =~ /^r/ ? 1 : 0;}->($mode) and $magic =~ /^\x42\x5A\x68[\x30-\x39]/
433 0 242 0 length $entry->type and $entry->is_file || $entry->is_longlink
435 0 184 0 $entry->is_file and not $entry->validate
449 0 184 0 $Archive::Tar::MAX_FILE_SIZE and $entry->size > $Archive::Tar::MAX_FILE_SIZE
463 159 3 22 $filter and not $entry->name =~ /$filter/
137 3 22 $filter_cb and not &$filter_cb($entry)
503 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
558 166 5 20 $filter and not $entry->name =~ /$filter/
146 5 20 $filter_cb and not &$filter_cb($entry)
571 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
763 3 94 111 ref $self && defined $self->{'cwd'}
796 3 11 90 ref $self and $self->{'_link_cache'}{$full_path}
851 12 273 0 -e $dir and not -d _
900 0 6 260 length $entry->type and $entry->is_file
935 260 0 0 $entry->is_hardlink and !!1 and $Archive::Tar::EXTRACT_HARDLINK
940 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
947 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
1096 0 0 0 @$aref == 1 and $aref->[0] eq "name"
1142 0 0 0 $Archive::Tar::RESOLVE_SYMLINK =~ /speed/ and @$iterargs == 3
1253 0 0 1 defined $mode and $mode =~ /^[0-7]{1,4}$/
1447 82 1 0 $clone->is_symlink && $Archive::Tar::FOLLOW_SYMLINK
1448 1 12 70 !$clone->is_symlink && $clone->has_content
1875 0 0 33 ref $tarfile and ref $tarfile eq "ARRAY"
2031 0 0 0 @trg and $trg[0] eq ""

or 2 conditions

line l !l condition
53 0 17 eval { do { require IO::String; 'IO::String'->import; 1 } } || 0
210 6 44 shift() || 0
211 10 40 shift() || {}
233 22 71 shift() || 0
347 81 0 shift() || {}
349 34 47 $opts->{'limit'} || 0
351 0 81 $opts->{'md5'} || 0
353 9 72 $opts->{'extract'} || 0
372 81 0 eval { do { tell $handle } } || 'unknown'
661 0 1 $hashmap || {map({$_->full_path, $_;} @{$self->_data;})}
1090 0 38 shift() || []
1359 15 18 shift() || 0
1367 30 0 $self->_get_handle($file, $gzip, sub { package Archive::Tar::Constant; use warnings; $_[0] ? 'wb' . (shift()) : 'w'; } ->($gzip)) || (return)
1416 9 65 length $clone->name > 100 || length $clone->prefix > 155 || 0
1506 0 83 shift() || 0
1544 83 0 $entry->version || '00'
1815 6 3 shift() || 0
1857 1 14 shift() || 0
1858 11 4 shift() || {}
1922 0 3 shift() || 0
1947 6 3 shift() || 0

or 3 conditions

line l !l&&r !l&&!r condition
234 93 0 0 shift() || sub { package Archive::Tar::Constant; use warnings; shift() ? 'rb' : 'r'; } ->(1)
264 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)/
433 184 0 58 $entry->is_file || $entry->is_longlink
463 0 0 140 $entry->name eq "pax_global_header" or $entry->type =~ /^(x|g)$/
558 0 0 151 $entry->name eq "pax_global_header" or $entry->type =~ /^(x|g)$/
585 0 6 15 $entry->is_longlink or $entry->is_dir
744 0 80 208 $vol or "File::Spec"->file_name_is_absolute($dirs)
748 80 0 0 defined $alt or $Archive::Tar::INSECURE_EXTRACT_MODE
770 81 10 117 defined $alt or $Archive::Tar::INSECURE_EXTRACT_MODE
894 0 9 257 -l $full or -e _
935 6 0 260 -l $full or $entry->is_hardlink and !!1 and $Archive::Tar::EXTRACT_HARDLINK
966 0 0 0 $entry->is_blockdev or $entry->is_chardev
1096 38 0 0 @$aref == 0 or @$aref == 1 and $aref->[0] eq "name"
1468 0 70 13 $link_ok or $data_ok
1599 22 0 0 -e $file or -l $file