Branch Coverage

blib/lib/Sys/Export.pm
Criterion Covered Total %
branch 59 102 57.8


line true false branch
17 144 162 $_ =~ /_IS/u ? :
18 270 36 eval { do { 'Fcntl'->can($_)->($_ =~ /_IS/u ? 0 : ()); 1 } } ? :
53 0 111 if (ref $_[$i] eq 'HASH') { }
3 108 elsif ($_[$i] =~ /^-(type|src|dst|tmp|src_userdb|dst_userdb|rewrite_path|rewrite_user|rewrite_group)\z/u) { }
60 1 40 if (keys %ctor_opts)
64 1 0 unless grep /^(add|:.*methods)\z/u, @_
82 1 0 unless $class =~ /::/u
83 0 1 unless &$is_module_name($class)
85 0 1 unless eval { do { &$require_module($class) } }
103 35 0 unless ref $_[0] eq "GLOB"
104 21318 10543 if &looks_like_number($_[0])
105 0 0 if builtin::blessed($_[0])
106 3 6 if builtin::blessed($_[0]) and $_[0]->can("add")
107 6 5 if builtin::blessed($_[0]) and $_[0]->can("user")
108 3 15 if builtin::blessed($_[0])
109 4 14 if builtin::blessed($_[0])
111 0 24 unless ref $_[0] eq "SCALAR"
115 2 2 &isa_array($data) ? :
131 10534 9 if @_ == 1 and &isa_array($_[0])
132 46 10497 @_ > 2 && &isa_hash($_[-1]) ? :
135 0 10543 if (&isa_int($mode)) { }
136 0 0 unless $mode_desc = $_mode_by_int[$mode & S_IFMT()]
140 0 10543 unless $mode =~ /^([a-z]+)([0-7]+)?\z/u
142 0 10543 unless $mode_desc = $_mode_alias{$1}
144 13 10530 defined $2 ? :
147 0 10543 unless length $name
149 10533 10 if (defined $data)
150 4 10529 if ($mode_desc and $mode_desc->[2]) { }
161 0 0 unless $n > 0
162 0 0 if $n <= 1
174 0 62 unless $n > 0
195 0 7 unless open my $fh, "<:raw", $filename
198 0 7 if $offset > $size
201 7 0 if ($length)
202 0 7 if ($offset > 0)
203 0 0 unless sysseek($fh, $offset, 0) == $offset
206 0 7 unless sysread($fh, $buf, $length) == $size
220 0 0 $ofs ? :
0 10751 if $Sys::Export::log->is_trace
223 0 10751 unless $size > 0
224 10751 0 if (defined $addr)
226 0 10751 unless $reached == $addr
229 10751 0 $data_ref ? :
232 1747 9004 if ($avail < $size)
234 0 1747 if ($avail > 1048576) { }
239 1747 0 $avail > 0 ? :
245 0 10751 unless defined $wrote
246 0 10751 if $wrote != $size
247 0 10751 if (length $second)
249 0 0 unless defined $wrote
250 0 0 if $wrote != length $second