Condition Coverage

blib/lib/Respite/Server/Test.pm
Criterion Covered Total %
condition 9 26 34.6


or 2 conditions

line l !l condition
13 5 0 shift() || {}
105 0 3 $server->{'tail_access'} || 20
120 3 0 $class->new('PeerHost', 'localhost', 'PeerPort', $port, 'SSL_verify_mode', 0) || (next)
127 0 0 $server->{'tail_error'} || 20

or 3 conditions

line l !l&&r !l&&!r condition
17 0 5 0 $args->{'port'} || do { require IO::Socket; my $sock = 'IO::Socket::INET'->new; throw('Could not create temp socket', {'msg', $!}) unless $sock->configure({'LocalPort', 0, 'Listen', 1, 'Proto', 'tcp', 'ReuseAddr', 1}); my $port = $sock->sockport || throw('Could not generate random usable sockport') }
29 0 5 0 $args->{'pid_file'} || "$tmpnam.${$}.pid"
30 0 5 0 $args->{'access_file'} || "$tmpnam.${$}.access"
31 0 5 0 $args->{'error_file'} || "$tmpnam.${$}.error"
38 0 5 0 $args->{'server'} || do { my $pkg = $args->{'server_class'} || 'Respite::Server'; (my $file = "$pkg.pm") =~ s[::][/]g; throw('Could not require client library', {'msg', $@}) unless eval { do { require $file } }; $pkg->new({'no_brand', $no_brand, $args->{'service'} ? ('server_name', $args->{'service'}) : (), $args->{'api_meta'} ? ('api_meta', $args->{'api_meta'}) : (), 'port', $port, 'server_type', $args->{'server_type'} || 'Fork', 'no_ssl', $no_ssl, 'flat', $flat, 'host', $args->{'host'} || 'localhost', 'pass', $args->{'pass'}, 'pid_file', $pid_file, 'access_log_file', $access_file, 'log_file', $error_file, 'user', defined $args->{'user'} ? $args->{'user'} : $<, 'group', defined $args->{'group'} ? $args->{'group'} : $(}) }
64 0 5 0 $args->{'client'} || do { my $pkg = $args->{'client_class'} || 'Respite::Client'; (my $file = "$pkg.pm") =~ s[::][/]g; throw('Could not require client library', {'msg', $@}) unless eval { do { require $file } }; $pkg->new({'no_brand', $no_brand, 'service', $service, 'port', $port, 'host', $server->{'host'}, 'pass', $args->{'pass'}, 'no_ssl', $no_ssl, 'flat', $flat, 'utf8_encoded', $encoded, $args->{'brand'} ? ('brand', $args->{'brand'}) : ()}) }