Condition Coverage

blib/lib/Net/SFTP/Foreign.pm
Criterion Covered Total %
condition 7 721 0.9


and 2 conditions

line l !l condition
1224 0 0 $debug and $debug and 32768

and 3 conditions

line !l l&&!r l&&r condition
66 0 0 0 warnings::enabled('deprecated') and warnings::enabled('Net::SFTP::Foreign')
91 0 0 0 $debug and $debug & 1
109 0 0 0 $debug and $debug & 32
132 0 0 0 $debug and $debug & 1
143 0 0 0 $debug and $debug & 1
235 0 0 0 defined $sftp->{'_timeout'} and $sftp->{'_timeout'} <= 0
259 0 0 0 $debug and $debug & 4
282 0 0 0 $debug and $debug & 4
288 0 0 0 defined $sftp->{'ssh_out'} and not $sftp->{'_ssh_out_is_not_dupped'}
293 0 0 0 $debug and $debug & 4
301 0 0 0 $debug and $debug & 4
303 0 0 0 $debug and $debug & 4
311 0 0 0 $debug and $debug & 4
328 0 0 0 $debug and $debug & 4
342 0 0 0 $debug and $debug & 4
347 0 0 0 $dbpid == $$ and $dbthread == $thread_generation
351 0 0 0 $debug and $debug & 4
360 0 0 0 $sftp->{'_status'} == 7 and $sftp->{'_password_authentication'}
0 0 0 $sftp->{'_status'} == 7 and $sftp->{'_password_authentication'} and $sftp->{'_password_sent'}
414 0 0 0 defined $ext and $ext == $version
580 0 0 0 @_ >= 2 and @_ <= 4
596 0 0 0 $debug and $debug & 2
622 0 0 0 $mkpath and $sftp->status == 2
648 0 0 0 $debug and $debug & 2
662 0 0 0 @_ >= 3 and @_ <= 4
708 0 0 0 @_ >= 3 and @_ <= 4
761 0 0 0 not $end and @msgid < $qsize
763 0 0 0 defined $data and length $data
802 0 0 0 $len and $sftp->{'_autoflush'}
808 0 0 0 @_ >= 2 and @_ <= 3
886 0 0 0 !defined($len) || $askoff < $len and @msgid < $qsize
912 0 0 0 $ensure_eof and $sftp->_get_msg_and_check(103, $ensure_eof, 5, q[Couldn't read from remote file])
977 0 0 0 @_ >= 2 and @_ <= 3
1040 0 0 0 ref $pofh && UNIVERSAL::isa($pofh, 'Net::SFTP::Foreign::FileHandle')
1083 0 0 0 @_ >= 2 and @_ <= 3
1105 34 0 0 ref $sftp and $sftp->{'_remote_has_volumes'}
0 0 0 ref $sftp and $sftp->{'_remote_has_volumes'} and $b =~ /^([a-z]\:)(.*)/i
1112 6 9 19 length $b and $b ne '.'
1113 13 4 2 not $b =~ m[^/] and $a ne '.'
1133 0 0 0 $debug and $debug & 4096
1138 0 0 0 @_ >= 2 and @_ <= 4
1157 0 0 0 $debug and $debug & 8192
1159 0 0 0 $debug and $debug & 8192
1171 0 0 0 $debug and $debug & 8192
1173 0 0 0 $debug and $debug & 8192
1175 0 0 0 $debug and $debug & 8192
1196 0 0 0 $debug and $debug & 32768
1199 0 0 0 @parts and not length $parts[-1]
1224 0 0 0 $debug and $debug
1233 0 0 0 $debug and $debug & 32768
1242 0 0 0 ref $pofh && UNIVERSAL::isa($pofh, 'Net::SFTP::Foreign::FileHandle')
1278 0 0 0 ref $pofh && UNIVERSAL::isa($pofh, 'Net::SFTP::Foreign::FileHandle')
1303 0 0 0 $debug and $debug & 2
1451 0 0 0 $overwrite and $numbered
1464 0 0 0 not $sftp->_rename($old, $new) and $sftp->{'_status'} == 4
1466 0 0 0 $numbered and $sftp->test_e($new)
1473 0 0 0 defined $rp_old and defined $rp_new
0 0 0 defined $rp_old and defined $rp_new and $rp_old eq $rp_new
1563 0 0 0 $debug and $debug & 128
1585 0 0 0 ref $local && $local->isa('GLOB')
1605 0 0 0 defined $perm and defined $copy_perm
1607 0 0 0 $numbered and $overwrite || $resume || $append
1610 0 0 0 $resume and $append
1625 0 0 0 $resume and $conversion
1643 0 0 0 $copy_time and not defined $atime
1672 0 0 0 $resume and $resume eq 'auto'
1705 0 0 0 $debug and $debug & 128
1720 0 0 0 $size >= 0 and $askoff > $size
1740 0 0 0 $lstart and $lstart > 0
1752 0 0 0 $numbered and -e $local
1773 0 0 0 $error and not $best_effort
1807 0 0 0 $size == -1 || $size + $block_size > $askoff and @msgid < $queue_size - $slow_start
0 0 0 $size == -1 || $size + $block_size > $askoff and @msgid < $queue_size - $slow_start and $safe_block_size
1856 0 0 0 length $data and defined $cb
1866 0 0 0 length $data and not $dont_save
1886 0 0 0 length $data and defined $cb
1893 0 0 0 length $data and not $dont_save
1910 0 0 0 length $data and not $dont_save
1984 0 0 0 $cleanup and $sftp->{'_error'}
2017 0 0 0 ref $local && $local->isa('GLOB')
2044 0 0 0 defined $perm and defined $umask
2046 0 0 0 defined $perm and $copy_perm
2048 0 0 0 $resume and $append
2050 0 0 0 $resume and $overwrite
2052 0 0 0 $numbered and $overwrite || $resume || $append
2054 0 0 0 $atomic and $resume || $append
2094 0 0 0 $resume and $resume eq 'auto'
2103 0 0 0 $debug and $debug & 16384
2107 0 0 0 $local_is_fh and defined $lsize
2109 0 0 0 $tell and $tell > 0
2118 0 0 0 $debug and $debug & 16384
2139 0 0 0 $resume and $resume eq 'auto'
0 0 0 $resume and $resume eq 'auto' and $rattrs->mtime <= $lmtime
2140 0 0 0 $debug and $debug & 16384
2146 0 0 0 $debug and $debug & 16384
2164 0 0 0 $debug and $debug & 16384
2175 0 0 0 $debug and $debug & 16384
2208 0 0 0 $debug and $debug & 16384
2221 0 0 0 defined $lsize and $writeoff > $lsize
2232 0 0 0 defined $lsize and $writeoff == $lsize
2233 0 0 0 defined $perm and $rattrs->perm != $perm
2247 0 0 0 not $numbered || $overwrite and $sftp->test_e($remote)
2258 0 0 0 $debug and $debug & 128
2272 0 0 0 $rfh and ref $numbered
2288 0 0 0 $debug and $debug & 2
2308 0 0 0 defined $perm and not $late_set_perm
2324 0 0 0 not $eof and @msgid < $queue_size
2327 0 0 0 not $eof_t and length $converted_input < $block_size
2347 0 0 0 $eof_t and not $len
2350 0 0 0 $debug and $debug & 16384
2356 0 0 0 $debug and $debug & 16384
2361 0 0 0 $debug and $debug & 16384
0 0 0 $debug and $debug & 16384 and length $data != $len
2389 0 0 0 $sparse and $data =~ /^\x{00}*$/s
2391 0 0 0 $debug and $debug & 16384
2394 0 0 0 $debug and $debug & 16384
2405 0 0 0 $eof and not @msgid
2424 0 0 0 $last_block_was_zeros and not $sftp->{'_error'}
2432 0 0 0 $late_set_perm and defined $perm
2433 0 0 0 $late_set_perm and defined $perm
2445 0 0 0 $cleanup and $sftp->{'_error'}
2485 0 0 0 $names_only && !$realpath
2487 0 0 0 $cheap and ref $opts{'wanted'} eq 'Regexp'
0 0 0 $cheap and ref $opts{'wanted'} eq 'Regexp' and not defined $opts{'no_wanted'}
2501 0 0 0 $atomic_readdir && $wanted
2502 0 0 0 $wanted and not $delayed_wanted
2550 0 0 0 $follow_links and _is_lnk($a->perm)
2571 0 0 0 $names_only && !$delayed_wanted
2663 0 0 0 $overwrite and $numbered
2709 0 0 0 $overwrite and $numbered
2735 0 0 0 $sftp->{'_error'} and $sftp->{'_status'} == 4
2737 0 0 0 $numbered and $sftp->test_e($remote)
0 0 0 $overwrite and $sftp->_remove_save_status($remote)
2779 0 0 0 $get_opts{'resume'} and $get_opts{'conversion'}
2817 0 0 0 $mkpath and $sftp->_mkpath_local($lpath, $perm)
2843 0 0 0 _is_lnk($e->{'a'}->perm) and not $ignore_links
2852 0 0 0 $newer_only and -e $lpath
0 0 0 $newer_only and -e $lpath and (stat _)[9] >= $e->{'a'}->mtime
2920 0 0 0 defined $perm and defined $umask
2922 0 0 0 defined $perm and $copy_perm
2969 0 0 0 $debug and $debug & 32768
2972 0 0 0 $debug and $debug & 32768
2984 0 0 0 $mkpath and $sftp->status == 2
3014 0 0 0 $debug and $debug & 32768
3018 0 0 0 _is_lnk($e->{'a'}->perm) and not $ignore_links
3028 0 0 0 $newer_only and $ra = $sftp->stat($rpath)
0 0 0 $newer_only and $ra = $sftp->stat($rpath) and $ra->mtime >= $e->{'a'}->mtime
3208 0 0 0 ref $pofh && UNIVERSAL::isa($pofh, 'Net::SFTP::Foreign::FileHandle')
3466 0 0 0 $Net::SFTP::Foreign::debug and $Net::SFTP::Foreign::debug & 4
3467 0 0 0 $self->_check and $sftp
3507 0 0 0 $Net::SFTP::Foreign::debug and $Net::SFTP::Foreign::debug & 4
3509 0 0 0 $self->_check and $sftp

or 2 conditions

line l !l condition
217 0 0 ${$class . '::VERSION';} || 0
224 0 0 delete $opts{'block_size'} || $defs{'block_size'} || 32768
225 0 0 delete $opts{'min_block_size'} || $defs{'min_block_size'} || 512
226 0 0 delete $opts{'queue_size'} || $defs{'queue_size'} || 32
282 0 0 $pid || ''
342 0 0 $dbpid || ''
0 0 $dbthread || ''
426 0 0 delete $sftp->{'incomming'}{$eid} || $sftp->_get_msg || (return undef)
616 0 0 $flags || 0
624 0 0 $da->perm || 0
812 0 0 $dir ||= ''
1196 0 0 $parent || 0
3293 0 0 shift() || 0
3415 0 0 $offset ||= 0
3466 0 0 $sftp || ''
3507 0 0 $sftp || ''

or 3 conditions

line l !l&&r !l&&!r condition
215 0 0 0 ref $backend || $backend
227 0 0 0 $defs{'read_ahead'} || $sftp->{'_block_size'} * 4
228 0 0 0 $defs{'write_delay'} || $sftp->{'_block_size'} * 8
258 0 0 0 not defined $ad or $ad == 2
300 0 0 0 $dirty or not defined $dirty
312 0 0 0 $wpr or $! == 10
347 0 0 0 not defined $dbpid or $dbpid == $$ and $dbthread == $thread_generation
760 0 0 0 not $end or @msgid
802 0 0 0 $len >= $sftp->{'_write_delay'} or $len and $sftp->{'_autoflush'}
885 0 0 0 not defined $len or length $$bin < $len
886 0 0 0 !defined($len) || $askoff < $len
982 0 0 0 not defined $sep or $sep eq ''
1172 0 0 0 $p =~ m[^(?:.*/)?\.{1,2}$] or $p =~ m[/$]
1353 0 0 0 not @$cache or wantarray
1595 0 0 0 delete $opts{'block_size'} || $sftp->{'_block_size'}
1596 0 0 0 delete $opts{'queue_size'} || $sftp->{'_queue_size'}
1607 0 0 0 $overwrite || $resume || $append
1609 0 0 0 $resume or $append
1630 0 0 0 defined $overwrite or $local_is_fh
0 0 0 defined $overwrite or $local_is_fh or $numbered
0 0 0 defined $overwrite or $local_is_fh or $numbered or $append
1631 0 0 0 defined $perm or defined $copy_perm
0 0 0 defined $perm or defined $copy_perm or $local_is_fh
1632 0 0 0 defined $copy_time or $local_is_fh
1634 0 0 0 $atomic || $numbered
1692 0 0 0 $local_is_fh or $overwrite
0 0 0 $local_is_fh or $overwrite or $append
0 0 0 $local_is_fh or $overwrite or $append or $resume
0 0 0 $local_is_fh or $overwrite or $append or $resume or $numbered
1745 0 0 0 $overwrite || $append
0 0 0 $numbered or not $overwrite || $append
1774 0 0 0 $resume or $append
1807 0 0 0 $size == -1 || $size + $block_size > $askoff
0 0 0 not @msgid or $size == -1 || $size + $block_size > $askoff and @msgid < $queue_size - $slow_start and $safe_block_size
1834 0 0 0 $roff != $loff or not $len
1920 0 0 0 $local_is_fh or CORE::close $fh
1930 0 0 0 CORE::utime $atime, $mtime, $local or $best_effort
2033 0 0 0 delete $opts{'block_size'} || $sftp->{'_block_size'}
2034 0 0 0 delete $opts{'queue_size'} || $sftp->{'_queue_size'}
2052 0 0 0 $overwrite || $resume || $append
2054 0 0 0 $resume || $append
2059 0 0 0 defined $overwrite or $numbered
2060 0 0 0 defined $perm or defined $copy_perm
0 0 0 defined $perm or defined $copy_perm or $local_is_fh
2061 0 0 0 defined $copy_time or $local_is_fh
2063 0 0 0 $atomic || $numbered
2094 0 0 0 $copy_perm or $copy_time
2133 0 0 0 $resume or $append
2151 0 0 0 $sftp->{'_status'} == 2 or $sftp->_ok_or_autodie
2247 0 0 0 $numbered || $overwrite
2268 0 0 0 $rfh or $sftp->{'_status'} != 4
0 0 0 $rfh or $sftp->{'_status'} != 4 or not $sftp->test_e($remote)
2286 0 0 0 $rfh or $rep
0 0 0 $rfh or $rep or not $overwrite
0 0 0 $rfh or $rep or not $overwrite or $sftp->{'_status'} != 3
2317 0 0 0 $append or not defined $lsize
2407 0 0 0 $eof or @msgid >= $queue_size
0 0 0 $eof or @msgid >= $queue_size or $sftp->_do_io(0)
2432 0 0 0 $copy_time or $late_set_perm and defined $perm
2495 0 0 0 delete $opts{'_wanted'} || _gen_wanted(delete $opts{'wanted'}, delete $opts{'no_wanted'})
2502 0 0 0 $follow_links or $realpath
0 0 0 $follow_links or $realpath or $wanted and not $delayed_wanted
2504 0 0 0 $queue_size || $sftp->{'_queue_size'}
2505 0 0 0 $queue_size ||= $max_queue_size < 2 ? $max_queue_size : 2
2534 0 0 0 not defined $cheap_wanted or $fn =~ /$cheap_wanted/
2570 0 0 0 not $wanted or $delayed_wanted
0 0 0 not $wanted or $delayed_wanted or &$wanted($sftp, $entry)
2629 0 0 0 not $wanted or &$wanted($sftp, $e)
2644 0 0 0 not $wanted or &$wanted($sftp, $e)
2667 0 0 0 defined $overwrite or $numbered
2713 0 0 0 defined $overwrite or $numbered
2804 0 0 0 not $wanted or &$wanted($sftp, $e)
2817 0 0 0 CORE::mkdir $lpath, $perm or $mkpath and $sftp->_mkpath_local($lpath, $perm)
2837 0 0 0 not $wanted or &$wanted($sftp, $e)
2967 0 0 0 not $wanted or &$wanted($lfs, $e)
3012 0 0 0 not $wanted or &$wanted($lfs, $e)
3364 0 0 0 ref $self || $self