Branch Coverage

blib/lib/Test/Memcached.pm
Criterion Covered Total %
branch 10 64 15.6


line true false branch
64 0 1 @_ == 1 ? :
70 0 1 if (defined $self->base_dir) { }
71 0 0 unless $self->base_dir =~ m[^/]
74 0 1 $ENV{'TEST_MEMCACHED_PRESERVE'} ? :
81 1 0 unless ($self->memcached)
82 1 0 unless my $prog = _find_program('memcached')
89 0 0 if ($output =~ /^memcached\s+((\d+)\.(\d+)\.(\d+))/) { }
104 0 0 if defined $self->pid
106 0 0 if ($> == 0 and not $self->options->{'user'})
111 0 0 unless ($self->options->{'unix_socket'} or $self->options->{'udp_port'} or $self->options->{'tcp_port'})
116 0 0 unless $port =~ /^[0-9]+$/ and $port < 19000
120 0 0 $^O eq 'MSWin32' ? :
127 0 0 if $sock
129 0 0 unless ($sock)
137 0 0 if ($self->options->{'tcp_port'} and not $self->options->{'bind'})
141 0 0 unless open my $logfh, '>>', $self->base_dir . '/memcached.log'
145 0 0 unless defined $pid
147 0 0 if ($pid == 0)
148 0 0 unless open STDOUT, '>&', $logfh
150 0 0 unless open STDERR, '>&', $logfh
160 0 0 if (my $port = $self->option('tcp_port'))
175 0 0 if ($remote) { }
189 0 0 if _check_port($port)
205 0 0 if ($name eq 'verbose') { }
209 0 0 $$data[1] ? :
219 0 0 unless defined $self->pid
232 0 1 if defined $self->pid and $$ == $self->_owner_pid
240 0 1 if $path
244 0 4 if (-x $memcached)
247 0 0 if ($path =~ s[/bin/memcached$][/$subdir/$prog] and -x $path)
261 0 2 if $path
263 2 0 unless -x $path