Branch Coverage

blib/lib/Beanstalk/Client.pm
Criterion Covered Total %
branch 6 160 3.7


line true false branch
46 1 0 unless my $sock = $self->socket || $self->connect
49 0 0 unless $MSG_NOSIGNAL
52 0 0 if $debug
55 0 0 if defined $data
60 0 0 if ($sent) { }
62 0 0 if $offset < length $cmd
66 0 0 if $!{'EINTR'} and fileno $sock
75 0 0 if ($read) { }
76 0 0 if ($buffer =~ /^([^\015\012]+)\015\012/)
78 0 0 if $debug
86 0 0 if $!{'EINTR'} and fileno $sock
104 0 0 if ($read) { }
107 0 0 if $more == 0
111 0 0 if $!{'EINTR'}
116 0 0 if $self->debug
124 1 0 unless my(@resp) = _interact($self, $cmd)
127 0 0 if ($resp[0] eq 'OK')
128 0 0 unless my $data = _recv_data($self, $resp[1])
139 0 0 unless my $ret = _interact_yaml_resp(@_)
149 0 0 unless my(@resp) = _interact($self, $cmd)
152 0 0 if ($resp[0] eq 'FOUND')
154 0 0 unless defined $data
170 0 0 if $watching
198 3 0 unless $server =~ /:/
207 3 0 unless ($sock)
218 0 0 if ($was_watching) { }
0 0 elsif (my $default_tube = $self->default_tube) { }
219 0 0 unless $self->watch_only(keys %$was_watching)
223 0 0 unless $self->use($default_tube) and $self->watch_only($default_tube)
227 0 0 if (defined $was_using)
228 0 0 unless $self->use($was_using)
238 0 3 if (my $sock = $self->socket)
254 0 0 exists $$opt{'priority'} ? :
255 0 0 exists $$opt{'ttr'} ? :
256 0 0 exists $$opt{'delay'} ? :
257 0 0 exists $$opt{'data'} ? :
259 0 0 if utf8::is_utf8($data)
263 0 0 unless my(@resp) = _interact($self, "put $pri $delay $ttr $bytes", $data)
266 0 0 if ($resp[0] =~ /( INSERTED | BURIED )/x)
267 0 0 $1 eq 'BURIED' ? :
290 0 0 @_ ? :
306 0 0 unless my(@resp) = _interact($self, "kick $bound")
309 0 0 if $resp[0] eq 'KICKED'
320 0 0 unless my(@resp) = _interact($self, "kick-job $job")
323 0 0 if $resp[0] eq 'KICKED'
334 0 0 unless my(@resp) = _interact($self, "use $tube")
337 0 0 if $resp[0] eq 'USING'
348 0 0 defined $timeout ? :
349 0 0 unless my(@resp) = _interact($self, $cmd)
352 0 0 if ($resp[0] eq 'RESERVED')
354 0 0 unless defined $data
373 0 0 unless my(@resp) = _interact($self, "delete $id")
375 0 0 if $resp[0] eq 'DELETED'
384 0 0 unless my(@resp) = _interact($self, "touch $id")
386 0 0 if $resp[0] eq 'TOUCHED'
398 0 0 exists $$opt{'priority'} ? :
399 0 0 exists $$opt{'delay'} ? :
401 0 0 unless my(@resp) = _interact($self, "release $id $pri $delay")
403 0 0 if $resp[0] eq 'RELEASED'
415 0 0 exists $$opt{'priority'} ? :
417 0 0 unless my(@resp) = _interact($self, "bury $id $pri")
419 0 0 if $resp[0] eq 'BURIED'
430 0 0 unless my $watching = $self->__watching
431 0 0 if $$watching{$tube}
433 0 0 unless my(@resp) = _interact($self, "watch $tube")
436 0 0 if ($resp[0] eq 'WATCHING')
450 0 0 unless my $watching = $self->__watching
451 0 0 unless $$watching{$tube}
453 0 0 unless my(@resp) = _interact($self, "ignore $tube")
456 0 0 if ($resp[0] eq 'WATCHING')
468 0 0 unless my $watching = $self->__watching
472 0 0 if delete $watched{$watch}
473 0 0 unless $ret = $self->watch($watch)
476 0 0 unless $ret = $self->ignore($ignore)
490 0 0 unless my $ret = _interact_yaml_resp($self, 'list-tubes')
498 0 0 unless my(@resp) = _interact($self, 'list-tube-used')
500 0 0 if $resp[0] eq 'USING'
509 1 0 unless my $ret = _interact_yaml_resp($self, 'list-tubes-watched')
520 0 0 unless my(@resp) = _interact($self, "pause-tube $tube $delay")
522 0 0 if $resp[0] eq 'PAUSED'