Condition Coverage

blib/lib/Net/FTP.pm
Criterion Covered Total %
condition 4 238 1.6


and 2 conditions

line l !l condition
32 0 2 eval { do { require IO::Socket::SSL; BEGIN {${^WARNING_BITS} = "\x54\x55\x55\x51\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x05"} 'IO::Socket::SSL'->VERSION(2.007) } } && 'IO::Socket::SSL'
39 2 0 !$ssl_class && 'To use SSL please install IO::Socket::SSL with version>=2.007'

and 3 conditions

line !l l&&!r l&&r condition
266 0 0 0 $ftp->_MDTM($file) && $ftp->message =~ /((\d\d)(\d\d\d?))(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)/
285 0 0 0 $ftp->_STAT($file) and (@msg = $ftp->message) == 3
351 0 0 0 $fwtype and defined do { *$ftp }->{'net_ftp_firewall'}
400 0 0 0 $ok == 2 and $ftp->code == 220
0 0 0 $ok == 2 and $ftp->code == 220 and $user =~ /\@/
412 0 0 0 not defined $pass and !defined($ruser) || $ruser =~ /^anonymous/o
419 0 0 0 defined $acct and $ok == 3 || $ok == 2
422 0 0 0 $fwtype == 7 and $ok == 2
0 0 0 $fwtype == 7 and $ok == 2 and defined do { *$ftp }->{'net_ftp_firewall'}
507 0 0 0 $ftp->supported('ALLO') and $ftp->_ALLO($size, @_)
567 0 0 0 $ftp->type eq 'I' and not binmode($loc)
629 0 0 0 defined $dir and $dir =~ /\S/
683 0 0 0 @filelist == 1 and $dir eq $filelist[0]
748 0 0 0 $pwd and $ftp->cwd($dir)
790 0 0 0 not defined $remote and 'STOU' ne uc $cmd
809 0 0 0 defined $remote and $remote =~ /[\r\n]/s
824 0 0 0 $ftp->type eq 'I' and not binmode($loc)
860 0 0 0 defined($wlen = $sock->write($buf, $len)) and $wlen == $len
877 0 0 0 'STOU' eq uc $cmd and $ftp->message =~ /unique\s+file\s*name\s*:\s*(.*)\)|"(.*)"/
899 0 0 0 do { ref $port eq 'ARRAY' } && do { $port = join(',', split(/\./, @$port[0], 0), @$port[1] >> 8, @$port[1] & 255) }
938 0 0 0 $ftp->_PASV and $ftp->message =~ /(\d+,\d+,\d+,\d+),(\d+),(\d+)/
953 0 0 0 $ftp->_EPSV && $ftp->message =~ /\(([\x33-\x7e])\1\1(\d+)\1\)/
1024 0 0 0 $ftp->ok and $ftp->message =~ /(?:^|\s)\"(.*)\"(?:$|\s)/
1139 0 0 0 do { *$ftp }->{'net_ftp_passive'} and not defined do { *$ftp }->{'net_ftp_pasv'}
0 0 0 do { *$ftp }->{'net_ftp_passive'} and not defined do { *$ftp }->{'net_ftp_pasv'} and not defined do { *$ftp }->{'net_ftp_port'}
1145 0 0 0 $where and not $ftp->_REST($where)
1158 0 0 0 $data and $cmd =~ /RETR|LIST|NLST|MLSD/
1171 0 0 0 $ok and $where
1177 0 0 0 $cmd =~ /(STOR|APPE|STOU)/ and exists do { *$ftp }->{'net_ftp_allo'}
0 0 0 $cmd =~ /(STOR|APPE|STOU)/ and exists do { *$ftp }->{'net_ftp_allo'} and $ftp->supported('ALLO')
1197 0 0 0 $data and $cmd =~ /RETR|LIST|NLST|MLSD/
1229 0 0 0 $code != 3 and $code != 1
1276 0 0 0 $sftp->retr($sfile) and $sftp->response == 1
1300 0 0 0 $dres == 2 and $sres == 2
1303 0 0 0 $ftp->ok and $non_pasv_server->ok

or 2 conditions

line l !l condition
56 2 0 $ssl_class || $inet6_class || 'IO::Socket::INET'
57 0 0 $inet6_class || ''
91 0 0 $arg{'Firewall'} || $ENV{'FTP_FIREWALL'} || $Net::FTP::NetConfig{'ftp_firewall'} || undef
99 0 0 $arg{'FirewallType'} || $ENV{'FTP_FIREWALL_TYPE'} || $Net::FTP::NetConfig{'firewall_type'} || undef
138 0 0 $arg{'BlockSize'} || 10240
201 0 0 $b || 1024
344 0 0 $user ||= 'anonymous'
348 0 0 do { *$ftp }->{'net_ftp_firewall_type'} || $Net::FTP::NetConfig{'ftp_firewall_type'} || 0
378 0 0 $fwpass || ''
416 0 0 $pass || ''
462 0 0 $auth || ''
464 0 0 $resp || ''
968 0 0 do { *$ftp }->{'net_ftp_supported'} ||= {}
990 0 0 $hash->{$cmd} ||= 0
1073 0 0 do { *$ftp }->{'net_ftp_tlsprot'} || ''
1131 0 0 delete do { *$ftp }->{'net_ftp_rest'} || 0
1227 0 0 $ftp->SUPER::response || 5
1245 0 0 do { *$ftp }->{'net_cmd_code'} || 0

or 3 conditions

line l !l&&r !l&&!r condition
47 2 0 0 eval { do { require IO::Socket::IP; BEGIN {${^WARNING_BITS} = "\x54\x55\x55\x51\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x05"} 'IO::Socket::IP'->VERSION(0.25) } } && 'IO::Socket::IP' || eval { do { require IO::Socket::INET6; BEGIN {${^WARNING_BITS} = "\x54\x55\x55\x51\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x05"} 'IO::Socket::INET6'->VERSION(2.62) } } && 'IO::Socket::INET6'
87 0 0 0 exists $arg{'Firewall'} or 'Net::Config'->requires_firewall($peer)
133 0 0 0 $arg{'Port'} || ($arg{'SSL'} ? 'ftps(990)' : 'ftp(21)')
0 0 0 $arg{'Domain'} || $arg{'Family'}
141 0 0 0 $arg{'Domain'} || $arg{'Family'}
169 0 0 0 $ftp->message || $@
315 0 0 0 $prot eq 'C' or $prot eq 'P'
352 0 0 0 $fwtype == 1 or $fwtype == 7
376 0 0 0 $ok == 2 or $ok == 3
380 0 0 0 $ok == 2 or $ok == 3
392 0 0 0 $ok == 2 or $ok == 3
412 0 0 0 !defined($ruser) || $ruser =~ /^anonymous/o
419 0 0 0 $ok == 3 || $ok == 2
445 0 0 0 eval { do { (getpwuid $>)[0] } } || $ENV{'NAME'}
0 0 0 $auth ||= eval { do { (getpwuid $>)[0] } } || $ENV{'NAME'}
448 0 0 0 'Net::Netrc'->lookup(do { *$ftp }->{'net_ftp_firewall'}, $auth) || 'Net::Netrc'->lookup(do { *$ftp }->{'net_ftp_firewall'})
458 0 0 0 @_ >= 1 or @_ <= 3
537 0 0 0 ref $local || ref \$local eq 'GLOB'
625 0 0 0 @_ == 1 or @_ == 2
662 0 0 0 @_ == 2 or @_ == 3
668 0 0 0 $ok = $ftp->_RMD($dir) or not $recurse
719 0 0 0 @_ == 2 or @_ == 3
723 0 0 0 $ftp->_MKD($dir) or $recurse
788 0 0 0 ref $local || ref \$local eq 'GLOB'
887 0 0 0 @_ == 1 or @_ == 2
892 0 0 0 @_ == 1 or @_ == 2
906 0 0 0 do { *$ftp }->{'net_ftp_listen'} ||= $IOCLASS->new('Listen', 1, 'Timeout', $ftp->timeout, 'LocalAddr', $ftp->sockhost, $family_key, $ftp->sockdomain, can_ssl() ? (%{${*$ftp;}{'net_ftp_tlsargs'};}, 'SSL_startHandshake', 0) : ())
912 0 0 0 $cmd eq 'EPRT' or $fam == 2
1169 0 0 0 defined do { *$ftp }->{'net_ftp_port'} or defined do { *$ftp }->{'net_ftp_pasv'}
1319 0 0 0 do { *$ftp }->{'net_ftp_feature'} ||= do { my @feat; @feat = map({/^\s+(.*\S)/;} $ftp->message) if $ftp->_FEAT; \@feat }
1390 0 0 0 $ok == 3 or $ok == 2