Branch Coverage

blib/lib/Sys/Export.pm
Criterion Covered Total %
branch 62 112 55.3


line true false branch
22 152 171 $_ =~ /_IS/u ? :
285 38 if eval { do { __PACKAGE__->can($_)->($_ =~ /_IS/u ? 0 : ()); 1 } }
24 0 38 if ($^O eq 'MSWin32' and $_ eq 'S_IFLNK') { }
0 38 elsif ($^O eq 'MSWin32' and $_ eq 'S_ISLNK') { }
25 0 0 unless eval "sub Sys::Export::S_IFLNK { 0x6000 } 1"
27 0 0 unless eval "sub Sys::Export::S_ISLNK { S_IFMT(\$_[0]) == 0x6000 } 1"
29 0 38 unless eval "sub Sys::Export::$_ { 0 } 1"
65 0 125 if (ref $_[$i] eq 'HASH') { }
3 122 elsif ($_[$i] =~ /^-(type|src|dst|tmp|src_userdb|dst_userdb|rewrite_path|rewrite_user|rewrite_group)\z/u) { }
72 1 46 if (keys %ctor_opts)
76 1 0 unless grep /^(add|:.*methods)\z/u, @_
94 1 0 unless $class =~ /::/u
95 0 1 unless &$is_module_name($class)
97 0 1 unless eval { do { &$require_module($class) } }
115 35 0 unless ref $_[0] eq "GLOB"
116 21318 10543 if &looks_like_number($_[0])
117 0 0 if builtin::blessed($_[0])
118 7 7 if builtin::blessed($_[0]) and $_[0]->can("add")
119 6 5 if builtin::blessed($_[0]) and $_[0]->can("user")
120 3 15 if builtin::blessed($_[0])
121 4 14 if builtin::blessed($_[0])
123 0 24 unless ref $_[0] eq "SCALAR"
127 2 2 &isa_array($data) ? :
143 10534 9 if @_ == 1 and &isa_array($_[0])
144 46 10497 @_ > 2 && &isa_hash($_[-1]) ? :
147 0 10543 if (&isa_int($mode)) { }
148 0 0 unless $mode_desc = $_mode_by_int[$mode & S_IFMT()]
152 0 10543 unless $mode =~ /^([a-z]+)([0-7]+)?\z/u
154 0 10543 unless $mode_desc = $_mode_alias{$1}
156 13 10530 defined $2 ? :
159 0 10543 unless length $name
161 10533 10 if (defined $data)
162 4 10529 if ($mode_desc and $mode_desc->[2]) { }
173 0 0 unless $n > 0
174 0 0 if $n <= 1
186 0 62 unless $n > 0
207 0 26 unless open my $fh, "<:raw", $filename
210 0 26 if $offset > $size
213 26 0 if ($length)
214 0 26 if ($offset > 0)
215 0 0 unless sysseek($fh, $offset, 0) == $offset
218 0 26 unless sysread($fh, $buf, $length) == $size
232 0 0 $ofs ? :
0 10751 if $Sys::Export::log->is_trace
235 0 10751 unless $size > 0
236 10751 0 if (defined $addr)
238 0 10751 unless $reached == $addr
241 10751 0 $data_ref ? :
244 1747 9004 if ($avail < $size)
246 0 1747 if ($avail > 1048576) { }
251 1747 0 $avail > 0 ? :
257 0 10751 unless defined $wrote
258 0 10751 if $wrote != $size
259 0 10751 if (length $second)
261 0 0 unless defined $wrote
262 0 0 if $wrote != length $second