Condition Coverage

blib/lib/Net/FTPServer.pm
Criterion Covered Total %
condition 94 225 41.7


and 3 conditions

line !l l&&!r l&&r condition
2331 0 41 0 (!defined($self->config('enable syslog')) || $self->config('enable syslog')) && !$self->{'_test_mode'}
2510 0 0 0 $virtual_host_multiplex and $virtual_host_multiplex eq $sockaddrstring
2570 0 0 0 $ipaddr and inet_ntoa($ipaddr) eq $peeraddrstring
2576 0 0 0 $self->config('require resolved addresses') and not $peerhostname
2704 0 0 0 defined $self->config('change process name') and not $self->config('change process name')
2749 41 0 0 defined $ident_timeout and $ident_timeout > 0
41 0 0 defined $ident_timeout and $ident_timeout > 0 and defined $self->{'peerport'}
0 0 0 defined $ident_timeout and $ident_timeout > 0 and defined $self->{'peerport'} and defined $self->{'sockport'}
0 0 0 defined $ident_timeout and $ident_timeout > 0 and defined $self->{'peerport'} and defined $self->{'sockport'} and defined $self->{'peeraddrstring'}
2901 284 27 0 /^PASS /i and $self->config('hide passwords in client log')
3264 0 0 120 exists $INC{'BSD/Resource.pm'} and exists &get_rlimits()->{$name}
3452 0 0 0 exists $ENV{'BIND'} and $ENV{'BIND'} =~ /^(\d+)$/
4012 1965 2 2 $self->{'sitename'} and exists $self->{'_config'}{"$self->{'sitename'}:$key"}
4374 0 0 0 $self->{'sitename'} and $self->{'sitename'} ne $rest
4505 0 3 3 $enforce and not $valid
4775 0 1 1 $self->_anon_passwd_validate_rfc822($pass) && !($pass =~ /^mozilla@/) && !($pass =~ /^IE[0-9]+User@/) && !($pass =~ /^nobody@/)
4879 0 0 0 $name eq $rest and $new_cwd = $self->_chdir($self->{'cwd'}, $dir)
4896 0 0 0 $new_cwd = $self->_chdir($self->{'cwd'}, $_) and $new_cwd = $self->_chdir($new_cwd, $rest)
4947 8 0 0 $filename and not exists $self->{'_chdir_message_cache'}{$self->{'cwd'}->pathname}
8 0 0 $filename and not exists $self->{'_chdir_message_cache'}{$self->{'cwd'}->pathname} and $file = $self->{'cwd'}->open($filename, 'r')
5031 0 0 6 $a1 > 0 and $a1 < 224
0 0 6 $a1 > 0 and $a1 < 224 and $a2 >= 0
0 0 6 $a1 > 0 and $a1 < 224 and $a2 >= 0 and $a2 < 256
0 0 6 $a1 > 0 and $a1 < 224 and $a2 >= 0 and $a2 < 256 and $a3 >= 0
0 0 6 $a1 > 0 and $a1 < 224 and $a2 >= 0 and $a2 < 256 and $a3 >= 0 and $a3 < 256
0 0 6 $a1 > 0 and $a1 < 224 and $a2 >= 0 and $a2 < 256 and $a3 >= 0 and $a3 < 256 and $a4 >= 0
0 0 6 $a1 > 0 and $a1 < 224 and $a2 >= 0 and $a2 < 256 and $a3 >= 0 and $a3 < 256 and $a4 >= 0 and $a4 < 256
5046 6 0 0 not $self->{'_test_mode'} and $hostaddrstring ne $self->{'peeraddrstring'}
5058 0 0 6 $hostport > 0 and $hostport < 65536
5547 0 0 50 close $sock and $file->close
5689 1 0 0 defined $fileh and defined $self->config('allow rename to overwrite')
1 0 0 defined $fileh and defined $self->config('allow rename to overwrite') and not $self->config('allow rename to overwrite')
5881 1 2 0 ($fileh || $wildcard) && $rest =~ m[(.*/).*]
5976 1 2 0 ($fileh || $wildcard) && $rest =~ m[(.*/).*]
6240 0 0 1 $rest =~ /^[1-9][0-9]*$/ and $rest >= $min_timeout
0 0 1 $rest =~ /^[1-9][0-9]*$/ and $rest >= $min_timeout and $rest <= $max_timeout
6275 0 0 0 defined $self->config('enable archive mode') and not $self->config('enable archive mode')
6370 1 0 0 defined $self->config('allow site version command') and not $self->config('allow site version command')
6383 0 1 0 $self->{'peeraddrstring'} and $self->{'peerport'}
6449 2 0 0 defined $self->config('allow site version command') and not $self->config('allow site version command')
6690 0 0 1 length $rest <= 8 and $rest =~ /^[A-Z]{1,8}(-[A-Z]{1-8})*$/i
7197 1 0 5 $dirh and $dirh->isa('Net::FTPServer::DirHandle')
7331 0 0 123 defined $filename and length $filename
7596 1 54 1 not $append and defined $fileh
55 1 0 not $append and defined $fileh and defined $self->config('allow store to overwrite')
55 0 0 not $append and defined $fileh and defined $self->config('allow store to overwrite') and not $self->config('allow store to overwrite')
7740 0 0 56 $sock->close and $file->close

or 2 conditions

line l !l condition
2256 41 0 shift() || [@ARGV]
2322 0 41 $self->config('max clients') || 255
2324 0 41 $self->config('max clients message') || 'Maximum connections reached'
2683 1 40 $self->config('limit memory') || 16384
2686 1 40 $self->config('limit nr processes') || 10
2689 1 40 $self->config('limit nr files') || 20
2712 4 37 $self->config('greeting type') || 'full'
3464 0 0 getservbyname('ftp', 'tcp') || 21
3852 34 41 $params{'file'} || 'no file'
3853 34 41 $params{'line'} || '0'
4462 7 1 $self->config('anonymous password check') || 'none'
4463 7 1 $self->config('anonymous password enforce') || 0
4526 0 1 $self->config('max login attempts') || 3
4572 0 18 (getpwnam $self->{'user'})[7] || '/'
4583 3 20 $self->config('welcome type') || 'normal'
6681 1 1 $ENV{'LANGUAGE'} || 'en'
7557 9 47 $params{'unique'} || 0
7558 1 55 $params{'append'} || 0

or 3 conditions

line l !l&&r !l&&!r condition
2618 0 41 0 $self->config('timeout') || $Net::FTPServer::_default_timeout
2627 41 0 0 !defined($self->config('enable archive mode')) || $self->config('enable archive mode')
2980 241 61 0 $self->{'authenticated'} or exists $no_authentication_commands{$cmd}
3138 0 0 0 not defined $self->{'_error_file'} or $log_file ne $self->{'_error_file'}
3154 0 0 0 not defined $self->{'_xfer_file'} or $log_file ne $self->{'_xfer_file'}
3179 0 0 0 not defined $self->{'_client_file'} or $log_file ne $self->{'_client_file'}
3880 41 24 10 $splat or not exists $self->{'_config'}{$key}
4411 8 0 19 $rest eq 'ftp' or $rest eq 'anonymous'
5129 12 0 12 defined $sock or --$count == 0
6238 0 1 0 $self->config('timeout') || $Net::FTPServer::_default_timeout
7125 0 0 0 $self->{'peerhostname'} || $self->{'peeraddrstring'}
7185 0 0 8 $_ eq '' or $_ eq '.'
7241 0 1 5 $_ eq '' or $_ eq '.'
7272 4 0 1 /\*/ or /\?/
7338 0 0 0 $_ eq '' or $_ eq '.'
7498 23 0 0 $time > $mtime + 15552000 or $time < $mtime - 3600