Branch Coverage

blib/lib/Net/Clacks/Client.pm
Criterion Covered Total %
branch 0 326 0.0


line true false branch
29 0 0 unless (defined $server and length $server)
32 0 0 unless (defined $port and length $port)
35 0 0 unless (defined $username and length $username)
38 0 0 unless (defined $password and length $password)
41 0 0 unless (defined $clientname and length $clientname)
57 0 0 unless (defined $socketpath and length $socketpath)
60 0 0 unless (defined $username and length $username)
63 0 0 unless (defined $password and length $password)
66 0 0 unless (defined $clientname and length $clientname)
75 0 0 unless ($udsloaded)
89 0 0 if (not defined $username or $username eq "")
92 0 0 if (not defined $password or $password eq "")
96 0 0 unless (defined($clientname || $clientname eq ''))
103 0 0 unless (defined $iscaching)
108 0 0 if ($self->{'iscaching'})
134 0 0 if (defined $self->{'socket'})
138 0 0 unless ($self->{'firstconnect'})
148 0 0 if (defined $self->{'server'} and defined $self->{'port'}) { }
0 0 elsif (defined $self->{'socketpath'}) { }
152 0 0 unless $socket = "IO::Socket::IP"->new("PeerHost", $self->{'server'}, "PeerPort", $self->{'port'}, "Type", 1)
157 0 0 unless $socket = "IO::Socket::UNIX"->new("Peer", $self->{'socketpath'}, "Type", 1)
167 0 0 if (ref $socket ne "IO::Socket::UNIX")
170 0 0 unless "IO::Socket::SSL"->start_SSL($socket, "SSL_verify_mode", 0)
191 0 0 if ($self->{'firstconnect'}) { }
217 0 0 if ($self->{'needreconnect'})
227 0 0 unless (defined $readtimeout)
232 0 0 if ($self->{'needreconnect'})
236 0 0 if ($self->{'nextremembrance'} and time > $self->{'nextremembrance'})
266 0 0 if (length $self->{'outbuffer'})
276 0 0 if ($brokenpipe or not $writeok)
282 0 0 if (defined $written and $written)
284 0 0 if (length $self->{'outbuffer'} == $written) { }
299 0 0 if (scalar @temp == 0)
313 0 0 unless ($readok)
318 0 0 if (defined $buf and length $buf)
328 0 0 if ($totalread) { }
336 0 0 if ($self->{'failcount'} > 5)
344 0 0 if ($char eq "\r") { }
0 0 elsif ($char eq "\n") { }
347 0 0 if ($self->{'inbuffer'} eq "NOP")
354 0 0 if ($self->{'firstline'})
355 0 0 if (not $self->{'inbuffer'} =~ /^CLACKS\ /u) { }
371 0 0 if ($self->{'firstline'} and $self->{'headertimeout'} < time)
406 0 0 unless (defined $line)
412 0 0 if ($line =~ /^NOTIFY\ (.+)/u) { }
0 0 elsif ($line =~ /^SET\ (.+?)\=(.*)/u) { }
0 0 elsif ($line =~ /^CLACKS\ (.+)/u) { }
0 0 elsif ($line =~ /^DEBUG\ (.+?)\=(.*)/u) { }
0 0 elsif ($line =~ /^QUIT/u) { }
0 0 elsif ($line =~ /^TIMEOUT/u) { }
0 0 elsif ($line =~ /^RECONNECTED/u) { }
0 0 elsif ($line =~ /^OVERHEAD\ (.+?)\ (.+)/u) { }
457 0 0 if (contains($key, \@flagparts)) { }
464 0 0 if ($parsedflags{'auth_ok'}) { }
0 0 elsif ($parsedflags{'error_message'}) { }
0 0 elsif ($parsedflags{'auth_failed'}) { }
0 0 elsif ($parsedflags{'informal_message'}) { }
475 0 0 if ($parsedflags{'forward_message'})
481 0 0 if ($parsedflags{'return_to_sender'})
483 0 0 if ($parsedflags{'no_logging'})
496 0 0 unless (defined $data{'type'})
509 0 0 if ($self->{'lastping'} < time - 120)
530 0 0 unless (defined $varname and length $varname)
535 0 0 if ($self->{'needreconnect'})
541 0 0 if ($self->{'memcached_compatibility'})
544 0 0 if ($self->{'needreconnect'})
548 0 0 unless length $self->{'outbuffer'}
560 0 0 unless (defined $varname and length $varname)
564 0 0 unless (defined $value)
569 0 0 unless (defined $forcesend)
573 0 0 if ($self->{'needreconnect'})
578 0 0 if ($self->{'iscaching'} and not $forcesend and defined $self->{'cache'}{$varname} and $self->{'cache'}{$varname} eq $value)
583 0 0 if ($self->{'iscaching'})
589 0 0 if ($self->{'memcached_compatibility'})
592 0 0 if ($self->{'needreconnect'})
596 0 0 unless length $self->{'outbuffer'}
609 0 0 unless (defined $varname and length $varname)
614 0 0 if ($self->{'needreconnect'})
626 0 0 unless (defined $varname and length $varname)
631 0 0 if ($self->{'needreconnect'})
643 0 0 if ($self->{'needreconnect'})
647 0 0 if (not defined $active && $active) { }
668 0 0 unless (defined $varname and length $varname)
672 0 0 unless (defined $value)
677 0 0 if ($self->{'needreconnect'})
684 0 0 if ($self->{'needreconnect'})
688 0 0 unless length $self->{'outbuffer'}
692 0 0 if ($self->{'memcached_compatibility'})
702 0 0 unless (defined $varname and length $varname)
709 0 0 if ($self->{'needreconnect'})
718 0 0 if ($self->{'needreconnect'})
722 0 0 unless length $self->{'outbuffer'}
729 0 0 if ($self->{'needreconnect'})
734 0 0 if ($self->{'inlines'}[$i] =~ /^RETRIEVED\ $varname/u or $self->{'inlines'}[$i] =~ /^NOTRETRIEVED\ $varname/u)
740 0 0 if defined $answerline
743 0 0 if ($answerline =~ /^RETRIEVED\ (.+?)\=(.*)/u)
745 0 0 if ($key ne $varname)
759 0 0 unless (defined $varname and length $varname)
764 0 0 if ($self->{'needreconnect'})
771 0 0 if ($self->{'needreconnect'})
775 0 0 unless length $self->{'outbuffer'}
779 0 0 if ($self->{'memcached_compatibility'})
789 0 0 unless (defined $varname and length $varname)
794 0 0 if ($self->{'needreconnect'})
798 0 0 if (not defined $stepsize) { }
807 0 0 if ($self->{'needreconnect'})
811 0 0 unless length $self->{'outbuffer'}
815 0 0 if ($self->{'memcached_compatibility'})
825 0 0 unless (defined $varname and length $varname)
830 0 0 if ($self->{'needreconnect'})
834 0 0 if (not defined $stepsize) { }
842 0 0 if ($self->{'needreconnect'})
846 0 0 unless length $self->{'outbuffer'}
850 0 0 if ($self->{'memcached_compatibility'})
860 0 0 if ($self->{'needreconnect'})
867 0 0 if ($self->{'needreconnect'})
871 0 0 unless length $self->{'outbuffer'}
875 0 0 if ($self->{'memcached_compatibility'})
885 0 0 if ($self->{'needreconnect'})
896 0 0 if ($self->{'needreconnect'})
900 0 0 unless length $self->{'outbuffer'}
909 0 0 if ($self->{'needreconnect'})
916 0 0 if ($self->{'inlines'}[$i] =~ /^KEYLISTSTART/u)
920 0 0 unless $liststartfound
921 0 0 if ($self->{'inlines'}[$i] =~ /^KEYLISTEND/u)
926 0 0 if $listendfound
934 0 0 if ($self->{'inlines'}[$idx] =~ /^KEYLISTSTART/u)
941 0 0 unless ($listfound)
946 0 0 if ($self->{'inlines'}[$idx] =~ /^KEYLISTEND/u)
951 0 0 if ($self->{'inlines'}[$idx] =~ /^KEY\ (.+)/u) { }
960 0 0 if ($self->{'memcached_compatibility'})
970 0 0 if ($self->{'needreconnect'})
981 0 0 if ($self->{'needreconnect'})
985 0 0 unless length $self->{'outbuffer'}
994 0 0 if ($self->{'needreconnect'})
1001 0 0 if ($self->{'inlines'}[$i] =~ /^CLIENTLISTSTART/u)
1005 0 0 unless $liststartfound
1006 0 0 if ($self->{'inlines'}[$i] =~ /^CLIENTLISTEND/u)
1011 0 0 if $listendfound
1019 0 0 if ($self->{'inlines'}[$idx] =~ /^CLIENTLISTSTART/u)
1026 0 0 unless ($listfound)
1031 0 0 if ($self->{'inlines'}[$idx] =~ /^CLIENTLISTEND/u)
1036 0 0 if ($self->{'inlines'}[$idx] =~ /^CLIENT\ (.+)/u) { }
1052 0 0 if ($self->{'memcached_compatibility'})
1062 0 0 if (not defined $flushid or $flushid eq "")
1066 0 0 if ($self->{'needreconnect'})
1075 0 0 if ($self->{'needreconnect'})
1079 0 0 unless length $self->{'outbuffer'}
1086 0 0 if ($self->{'needreconnect'})
1091 0 0 if ($self->{'inlines'}[$i] =~ /^FLUSHED\ $flushid/u)
1097 0 0 if defined $answerline
1110 0 0 if ($line->{'type'} eq "disconnect")
1123 0 0 unless (defined $command and length $command)
1128 0 0 if ($self->{'needreconnect'})
1143 0 0 unless (defined $varname and length $varname)
1148 0 0 unless (defined $value)
1153 0 0 unless (defined $forcesend)
1159 0 0 if ($self->{'memcached_compatibility'})
1162 0 0 if ($self->{'needreconnect'})
1166 0 0 unless length $self->{'outbuffer'}
1179 0 0 if ($self->{'needreconnect'})
1188 0 0 if time > $endtime
1190 0 0 unless length $self->{'outbuffer'}