Condition Coverage

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


and 2 conditions

line l !l condition
1225 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
801 0 0 0 $len and $sftp->{'_autoflush'}
809 0 0 0 @_ >= 2 and @_ <= 3
887 0 0 0 !defined($len) || $askoff < $len and @msgid < $qsize
913 0 0 0 $ensure_eof and $sftp->_get_msg_and_check(103, $ensure_eof, 5, q[Couldn't read from remote file])
978 0 0 0 @_ >= 2 and @_ <= 3
1041 0 0 0 ref $pofh && UNIVERSAL::isa($pofh, 'Net::SFTP::Foreign::FileHandle')
1084 0 0 0 @_ >= 2 and @_ <= 3
1106 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
1113 6 9 19 length $b and $b ne '.'
1114 13 4 2 not $b =~ m[^/] and $a ne '.'
1134 0 0 0 $debug and $debug & 4096
1139 0 0 0 @_ >= 2 and @_ <= 4
1158 0 0 0 $debug and $debug & 8192
1160 0 0 0 $debug and $debug & 8192
1172 0 0 0 $debug and $debug & 8192
1174 0 0 0 $debug and $debug & 8192
1176 0 0 0 $debug and $debug & 8192
1197 0 0 0 $debug and $debug & 32768
1200 0 0 0 @parts and not length $parts[-1]
1225 0 0 0 $debug and $debug
1234 0 0 0 $debug and $debug & 32768
1243 0 0 0 ref $pofh && UNIVERSAL::isa($pofh, 'Net::SFTP::Foreign::FileHandle')
1279 0 0 0 ref $pofh && UNIVERSAL::isa($pofh, 'Net::SFTP::Foreign::FileHandle')
1304 0 0 0 $debug and $debug & 2
1452 0 0 0 $overwrite and $numbered
1465 0 0 0 not $sftp->_rename($old, $new) and $sftp->{'_status'} == 4
1467 0 0 0 $numbered and $sftp->test_e($new)
1474 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
1564 0 0 0 $debug and $debug & 128
1586 0 0 0 ref $local && $local->isa('GLOB')
1606 0 0 0 defined $perm and defined $copy_perm
1608 0 0 0 $numbered and $overwrite || $resume || $append
1611 0 0 0 $resume and $append
1626 0 0 0 $resume and $conversion
1644 0 0 0 $copy_time and not defined $atime
1673 0 0 0 $resume and $resume eq 'auto'
1706 0 0 0 $debug and $debug & 128
1721 0 0 0 $size >= 0 and $askoff > $size
1741 0 0 0 $lstart and $lstart > 0
1753 0 0 0 $numbered and -e $local
1774 0 0 0 $error and not $best_effort
1808 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
1857 0 0 0 length $data and defined $cb
1867 0 0 0 length $data and not $dont_save
1887 0 0 0 length $data and defined $cb
1894 0 0 0 length $data and not $dont_save
1911 0 0 0 length $data and not $dont_save
1985 0 0 0 $cleanup and $sftp->{'_error'}
2018 0 0 0 ref $local && $local->isa('GLOB')
2045 0 0 0 defined $perm and defined $umask
2047 0 0 0 defined $perm and $copy_perm
2049 0 0 0 $resume and $append
2051 0 0 0 $resume and $overwrite
2053 0 0 0 $numbered and $overwrite || $resume || $append
2055 0 0 0 $atomic and $resume || $append
2095 0 0 0 $resume and $resume eq 'auto'
2104 0 0 0 $debug and $debug & 16384
2108 0 0 0 $local_is_fh and defined $lsize
2110 0 0 0 $tell and $tell > 0
2119 0 0 0 $debug and $debug & 16384
2140 0 0 0 $resume and $resume eq 'auto'
0 0 0 $resume and $resume eq 'auto' and $rattrs->mtime <= $lmtime
2141 0 0 0 $debug and $debug & 16384
2147 0 0 0 $debug and $debug & 16384
2165 0 0 0 $debug and $debug & 16384
2176 0 0 0 $debug and $debug & 16384
2209 0 0 0 $debug and $debug & 16384
2222 0 0 0 defined $lsize and $writeoff > $lsize
2233 0 0 0 defined $lsize and $writeoff == $lsize
2234 0 0 0 defined $perm and $rattrs->perm != $perm
2248 0 0 0 not $numbered || $overwrite and $sftp->test_e($remote)
2259 0 0 0 $debug and $debug & 128
2273 0 0 0 $rfh and ref $numbered
2289 0 0 0 $debug and $debug & 2
2309 0 0 0 defined $perm and not $late_set_perm
2325 0 0 0 not $eof and @msgid < $queue_size
2328 0 0 0 not $eof_t and length $converted_input < $block_size
2348 0 0 0 $eof_t and not $len
2351 0 0 0 $debug and $debug & 16384
2357 0 0 0 $debug and $debug & 16384
2362 0 0 0 $debug and $debug & 16384
0 0 0 $debug and $debug & 16384 and length $data != $len
2390 0 0 0 $sparse and $data =~ /^\x{00}*$/s
2392 0 0 0 $debug and $debug & 16384
2395 0 0 0 $debug and $debug & 16384
2406 0 0 0 $eof and not @msgid
2425 0 0 0 $last_block_was_zeros and not $sftp->{'_error'}
2433 0 0 0 $late_set_perm and defined $perm
2434 0 0 0 $late_set_perm and defined $perm
2446 0 0 0 $cleanup and $sftp->{'_error'}
2486 0 0 0 $names_only && !$realpath
2488 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'}
2502 0 0 0 $atomic_readdir && $wanted
2503 0 0 0 $wanted and not $delayed_wanted
2551 0 0 0 $follow_links and _is_lnk($a->perm)
2572 0 0 0 $names_only && !$delayed_wanted
2664 0 0 0 $overwrite and $numbered
2710 0 0 0 $overwrite and $numbered
2736 0 0 0 $sftp->{'_error'} and $sftp->{'_status'} == 4
2738 0 0 0 $numbered and $sftp->test_e($remote)
0 0 0 $overwrite and $sftp->_remove_save_status($remote)
2780 0 0 0 $get_opts{'resume'} and $get_opts{'conversion'}
2818 0 0 0 $mkpath and $sftp->_mkpath_local($lpath, $perm)
2844 0 0 0 _is_lnk($e->{'a'}->perm) and not $ignore_links
2853 0 0 0 $newer_only and -e $lpath
0 0 0 $newer_only and -e $lpath and (stat _)[9] >= $e->{'a'}->mtime
2921 0 0 0 defined $perm and defined $umask
2923 0 0 0 defined $perm and $copy_perm
2970 0 0 0 $debug and $debug & 32768
2973 0 0 0 $debug and $debug & 32768
2985 0 0 0 $mkpath and $sftp->status == 2
3015 0 0 0 $debug and $debug & 32768
3019 0 0 0 _is_lnk($e->{'a'}->perm) and not $ignore_links
3029 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
3209 0 0 0 ref $pofh && UNIVERSAL::isa($pofh, 'Net::SFTP::Foreign::FileHandle')
3467 0 0 0 $Net::SFTP::Foreign::debug and $Net::SFTP::Foreign::debug & 4
3468 0 0 0 $self->_check and $sftp
3508 0 0 0 $Net::SFTP::Foreign::debug and $Net::SFTP::Foreign::debug & 4
3510 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
813 0 0 $dir ||= ''
1197 0 0 $parent || 0
3294 0 0 shift() || 0
3416 0 0 $offset ||= 0
3467 0 0 $sftp || ''
3508 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
801 0 0 0 $len >= $sftp->{'_write_delay'} or $len and $sftp->{'_autoflush'}
886 0 0 0 not defined $len or length $$bin < $len
887 0 0 0 !defined($len) || $askoff < $len
983 0 0 0 not defined $sep or $sep eq ''
1173 0 0 0 $p =~ m[^(?:.*/)?\.{1,2}$] or $p =~ m[/$]
1354 0 0 0 not @$cache or wantarray
1596 0 0 0 delete $opts{'block_size'} || $sftp->{'_block_size'}
1597 0 0 0 delete $opts{'queue_size'} || $sftp->{'_queue_size'}
1608 0 0 0 $overwrite || $resume || $append
1610 0 0 0 $resume or $append
1631 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
1632 0 0 0 defined $perm or defined $copy_perm
0 0 0 defined $perm or defined $copy_perm or $local_is_fh
1633 0 0 0 defined $copy_time or $local_is_fh
1635 0 0 0 $atomic || $numbered
1693 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
1746 0 0 0 $overwrite || $append
0 0 0 $numbered or not $overwrite || $append
1775 0 0 0 $resume or $append
1808 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
1835 0 0 0 $roff != $loff or not $len
1921 0 0 0 $local_is_fh or CORE::close $fh
1931 0 0 0 CORE::utime $atime, $mtime, $local or $best_effort
2034 0 0 0 delete $opts{'block_size'} || $sftp->{'_block_size'}
2035 0 0 0 delete $opts{'queue_size'} || $sftp->{'_queue_size'}
2053 0 0 0 $overwrite || $resume || $append
2055 0 0 0 $resume || $append
2060 0 0 0 defined $overwrite or $numbered
2061 0 0 0 defined $perm or defined $copy_perm
0 0 0 defined $perm or defined $copy_perm or $local_is_fh
2062 0 0 0 defined $copy_time or $local_is_fh
2064 0 0 0 $atomic || $numbered
2095 0 0 0 $copy_perm or $copy_time
2134 0 0 0 $resume or $append
2152 0 0 0 $sftp->{'_status'} == 2 or $sftp->_ok_or_autodie
2248 0 0 0 $numbered || $overwrite
2269 0 0 0 $rfh or $sftp->{'_status'} != 4
0 0 0 $rfh or $sftp->{'_status'} != 4 or not $sftp->test_e($remote)
2287 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
2318 0 0 0 $append or not defined $lsize
2408 0 0 0 $eof or @msgid >= $queue_size
0 0 0 $eof or @msgid >= $queue_size or $sftp->_do_io(0)
2433 0 0 0 $copy_time or $late_set_perm and defined $perm
2496 0 0 0 delete $opts{'_wanted'} || _gen_wanted(delete $opts{'wanted'}, delete $opts{'no_wanted'})
2503 0 0 0 $follow_links or $realpath
0 0 0 $follow_links or $realpath or $wanted and not $delayed_wanted
2505 0 0 0 $queue_size || $sftp->{'_queue_size'}
2506 0 0 0 $queue_size ||= $max_queue_size < 2 ? $max_queue_size : 2
2535 0 0 0 not defined $cheap_wanted or $fn =~ /$cheap_wanted/
2571 0 0 0 not $wanted or $delayed_wanted
0 0 0 not $wanted or $delayed_wanted or &$wanted($sftp, $entry)
2630 0 0 0 not $wanted or &$wanted($sftp, $e)
2645 0 0 0 not $wanted or &$wanted($sftp, $e)
2668 0 0 0 defined $overwrite or $numbered
2714 0 0 0 defined $overwrite or $numbered
2805 0 0 0 not $wanted or &$wanted($sftp, $e)
2818 0 0 0 CORE::mkdir $lpath, $perm or $mkpath and $sftp->_mkpath_local($lpath, $perm)
2838 0 0 0 not $wanted or &$wanted($sftp, $e)
2968 0 0 0 not $wanted or &$wanted($lfs, $e)
3013 0 0 0 not $wanted or &$wanted($lfs, $e)
3365 0 0 0 ref $self || $self