Condition Coverage

blib/lib/Sys/Export/Unix.pm
Criterion Covered Total %
condition 114 266 42.8


and 3 conditions

line !l l&&!r l&&r condition
25 7 0 0 @_ == 1 && &isa_hash($_[0])
66 13 0 1 defined $attrs{$_} and not &isa_userdb($attrs{$_})
148 7 0 0 ref $dest and $dest->can("info")
183 2 0 0 exists $rw->{$orig} and $rw->{$orig} ne $new
203 1 0 51 length $_ && $_ ne '.'
218 11 0 18 length $_ && $_ ne '.'
226 23 0 0 $self->{'log_trace'} and $abs ne $path
235 6 4 58 length $_ && $_ ne '.'
299 1 0 0 defined $self->_dst->can("dst_abs") and -f $self->_dst->dst_abs . 'etc/passwd'
331 22 0 22 defined $file{'name'} and defined $file{'mode'}
335 20 0 2 exists $self->{'src_path_set'}{$src_path} and not defined $file{'name'}
375 39 0 1 defined $file{'user'} and not defined $file{'uid'}
383 39 0 1 defined $file{'group'} and not defined $file{'gid'}
418 11 20 9 length $dst_parent and not exists $self->{'dst_path_set'}{$dst_parent}
421 1 8 0 $self->_dst->can("dst_abs") and -d $self->_dst->dst_abs . $dst_parent
441 3 0 1 @dir{"dev", "ino", "mode", "nlink", "uid", "gid", "rdev", "size", "atime", "mtime", "ctime"} = lstat $self->{'src_abs'} . $dst_parent and S_ISDIR($dir{'mode'})
497 3 16 19 length $_[0] and !defined($filter) || &$filter(\%file)
498 26 0 12 $is_dir and not delete $file{'prune'}
516 12 12 33 $ent ne "." and $ent ne ".."
551 12 10 0 $self->{'_log_trace'} and $path ne $rewrote
564 0 0 0 $dst_userdb and not defined $dst_uid
578 0 0 0 $dst_userdb and not defined $dst_gid
600 13 0 1 $file->{'nlink'} > 1 and defined $file->{'data_path'}
670 0 0 0 $self->_has_rewrites and length $file->{'src_path'}
0 0 0 $self->_has_rewrites and length $file->{'src_path'} and defined $interpreter
708 0 1 1 $self->_has_rewrites and length $file->{'src_path'}
755 3 2 0 not $file->{'data'} =~ m[^/]u and substr($file->{'data_path'}, 0, length $self->{'src_abs'}) ne $self->{'src_abs'}
765 0 1 4 defined $abs_target and lstat $self->{'src_abs'} . $abs_target
774 4 0 1 $self->_has_rewrites and length $file->{'src_path'}
805 0 1 0 @target_parts and $target_parts[0] eq ".."
809 1 0 1 @target_parts and $target_parts[0] ne ".."
817 1 0 3 @dst_parts and @dst_target
1 0 3 @dst_parts and @dst_target and $dst_parts[0] eq $dst_target[0]
832 1 0 0 defined $file->{'rdev_major'} && defined $file->{'rdev_minor'}
0 0 1 defined $file->{'rdev'} and not defined $file->{'rdev_major'} && defined $file->{'rdev_minor'}

or 2 conditions

line l !l condition
74 1 6 $self->{'log'} //= "info"
92 0 0 $self->{'src_path_set'} //= {}
93 3 0 $self->{'dst_path_set'} //= {}
94 1 0 $self->{'dst_uid_used'} //= {}
95 1 0 $self->{'dst_gid_used'} //= {}
102 1 2 $self->{'path_rewrite_map'} // {}
110 1 1 $self->{'link_map'} //= {}
114 0 0 $self->{'elf_interpreters'} //= {}
164 27 4 $self->{'_log_name_widths'} //= []
177 1 1 $self->{'path_rewrite_map'} //= {}
236 8 0 $path[0] // ""
302 0 1 $self->{'_user_rewrite_map'} //= {}
303 0 1 $self->{'_group_rewrite_map'} //= {}
365 0 0 $file{'uid'} // 0
0 0 $file{'gid'} // 0
373 28 12 $file{'nlink'} //= 1
396 0 0 $self->on_collision // "ignore_if_same"
400 0 0 $file{'src_path'} // ""
511 5 0 $path //= ""
534 1 12 $self->{'src_path_set'}{$path =~ s[^/][]ru} //= undef
628 6 8 $file->{'src_path'} // "(data)"
634 0 0 $rpath // ""
667 0 0 $interpreter // ""
742 5 5 $dir->{'src_path'} // "(default)"
861 0 6 $_[0] //= ""

or 3 conditions

line l !l&&r !l&&!r condition
60 0 5 0 $attrs{'tmp'} //= $attrs{'_dst'}->tmp
62 5 2 0 $attrs{'tmp'} //= "File::Temp"->newdir
101 21 3 0 $self->{'path_rewrite_regex'} //= do { my $rw = $self->{'path_rewrite_map'} // {}; !keys(%$rw) ? qr/(*FAIL)/u : qr/(@{[join("|", map(quotemeta($_), reverse sort(keys %{$$self{"path_rewrite_map"};})))];})/u }
180 0 0 2 $orig =~ m[^[.]+/]u or $new =~ m[^[.]+/]u
247 0 0 0 $self->{'dst_userdb'} //= $self->_build_dst_userdb
254 0 0 0 $self->{'src_userdb'} //= $self->_build_src_userdb
268 0 0 0 $self->{'dst_userdb'} //= $self->_build_dst_userdb
275 0 0 0 $self->{'src_userdb'} //= $self->_build_src_userdb
297 1 0 0 $self->{'src_userdb'} //= $self->_build_src_userdb
342 0 20 0 $file{'real_src_path'} // $self->_src_parent_abs_path($src_path)
362 18 0 0 defined $file{'uid'} or defined $file{'gid'}
365 0 0 18 $self->{'_user_rewrite_map'} or $self->{'_group_rewrite_map'}
368 0 18 0 $file{'data_path'} //= $self->{'src_abs'} . $real_src_path
369 0 18 0 $file{'name'} //= $self->get_dst_for_src($real_src_path)
376 0 1 0 $self->{'dst_userdb'} //= $self->_build_dst_userdb
0 1 0 $dst_userdb //= ($self->{'dst_userdb'} //= $self->_build_dst_userdb)
378 1 0 0 $dst_userdb->user($file{'user'}) // croak("Unknown user '$file{'user'}' for file '$file{'name'}'")
384 0 0 0 $self->{'dst_userdb'} //= $self->_build_dst_userdb
1 0 0 $dst_userdb //= ($self->{'dst_userdb'} //= $self->_build_dst_userdb)
386 1 0 0 $dst_userdb->group($file{'group'}) // croak("Unknown group '$file{'group'}' for file '$file{'name'}'")
431 3 1 2 not length $src_parent or $self->get_dst_for_src($src_parent) ne $dst_parent
432 3 0 0 $src_parent //= $dst_parent
460 31 0 0 $file{'mode'} // croak("attribute 'mode' is required, for $file{'name'}")
461 0 1 1 S_ISBLK($mode) or S_ISCHR($mode)
469 0 0 0 $file{'src_path'} // $file{'data_path'}
0 0 0 ($file{'src_path'} // $file{'data_path'}) // $file{'name'}
497 5 19 11 !defined($filter) || &$filter(\%file)
532 13 0 0 $path->{'src_path'} // $path->{'name'}
0 0 0 ($path->{'src_path'} // $path->{'name'}) // croak("Hashrefs passed to ->skip must include 'src_path' or 'name'")
561 0 0 0 $dst_userdb or $self->{'_user_rewrite_map'}
0 0 0 $dst_userdb or $self->{'_user_rewrite_map'} or $self->{'_group_rewrite_map'}
565 0 0 0 $self->{'src_userdb'} //= $self->_build_src_userdb
579 0 0 0 $self->{'src_userdb'} //= $self->_build_src_userdb
655 0 0 0 $self->_resolve_src_library($_, $elf->{'rpath'}) // carp("Can't find lib $_ needed for $file->{'src_path'}")
834 0 1 0 $file->{'rdev_major'} //= $major
835 0 1 0 $file->{'rdev_minor'} //= $minor
870 0 0 0 $!{'EAGAIN'} or $!{'EINTR'}