Branch Coverage

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


line true false branch
30 0 0 unless (defined $server and length $server)
33 0 0 unless (defined $port and length $port)
36 0 0 unless (defined $username and length $username)
39 0 0 unless (defined $password and length $password)
42 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)
87 0 0 if (not defined $username or $username eq "")
90 0 0 if (not defined $password or $password eq "")
94 0 0 unless (defined($clientname || $clientname eq ''))
101 0 0 unless (defined $iscaching)
106 0 0 if ($self->{'iscaching'})
131 0 0 if (defined $self->{'socket'})
135 0 0 unless ($self->{'firstconnect'})
145 0 0 if (defined $self->{'server'} and defined $self->{'port'}) { }
0 0 elsif (defined $self->{'socketpath'}) { }
149 0 0 unless $socket = "IO::Socket::IP"->new("PeerHost", $self->{'server'}, "PeerPort", $self->{'port'}, "Type", 1)
154 0 0 unless $socket = "IO::Socket::UNIX"->new("Peer", $self->{'socketpath'}, "Type", 1)
164 0 0 if (ref $socket ne "IO::Socket::UNIX")
167 0 0 unless "IO::Socket::SSL"->start_SSL($socket, "SSL_verify_mode", 0)
188 0 0 if ($self->{'firstconnect'}) { }
210 0 0 if ($self->{'needreconnect'})
218 0 0 unless (defined $readtimeout)
223 0 0 if ($self->{'needreconnect'})
227 0 0 if ($self->{'nextremembrance'} and time > $self->{'nextremembrance'})
257 0 0 if (length $self->{'outbuffer'})
267 0 0 if ($brokenpipe or not $writeok)
273 0 0 if (defined $written and $written)
275 0 0 if (length $self->{'outbuffer'} == $written) { }
290 0 0 if (scalar @temp == 0)
304 0 0 unless ($readok)
309 0 0 if (defined $buf and length $buf)
319 0 0 if ($totalread) { }
327 0 0 if ($self->{'failcount'} > 5)
335 0 0 if ($char eq "\r") { }
0 0 elsif ($char eq "\n") { }
338 0 0 if ($self->{'inbuffer'} eq "NOP")
345 0 0 if ($self->{'firstline'})
346 0 0 if (not $self->{'inbuffer'} =~ /^CLACKS\ /u) { }
362 0 0 if ($self->{'firstline'} and $self->{'headertimeout'} < time)
395 0 0 unless (defined $line)
401 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) { }
446 0 0 if (contains($key, \@flagparts)) { }
453 0 0 if ($parsedflags{'auth_ok'}) { }
0 0 elsif ($parsedflags{'error_message'}) { }
0 0 elsif ($parsedflags{'auth_failed'}) { }
0 0 elsif ($parsedflags{'informal_message'}) { }
464 0 0 if ($parsedflags{'forward_message'})
470 0 0 if ($parsedflags{'return_to_sender'})
472 0 0 if ($parsedflags{'no_logging'})
485 0 0 unless (defined $data{'type'})
496 0 0 if ($self->{'lastping'} < time - 120)
513 0 0 unless (defined $varname and length $varname)
518 0 0 if ($self->{'needreconnect'})
524 0 0 if ($self->{'memcached_compatibility'})
527 0 0 if ($self->{'needreconnect'})
531 0 0 unless length $self->{'outbuffer'}
541 0 0 unless (defined $varname and length $varname)
545 0 0 unless (defined $value)
550 0 0 unless (defined $forcesend)
554 0 0 if ($self->{'needreconnect'})
559 0 0 if ($self->{'iscaching'} and not $forcesend and defined $self->{'cache'}{$varname} and $self->{'cache'}{$varname} eq $value)
564 0 0 if ($self->{'iscaching'})
570 0 0 if ($self->{'memcached_compatibility'})
573 0 0 if ($self->{'needreconnect'})
577 0 0 unless length $self->{'outbuffer'}
588 0 0 unless (defined $varname and length $varname)
593 0 0 if ($self->{'needreconnect'})
603 0 0 unless (defined $varname and length $varname)
608 0 0 if ($self->{'needreconnect'})
618 0 0 if ($self->{'needreconnect'})
622 0 0 if (not defined $active && $active) { }
639 0 0 unless (defined $varname and length $varname)
643 0 0 unless (defined $value)
648 0 0 if ($self->{'needreconnect'})
655 0 0 if ($self->{'needreconnect'})
659 0 0 unless length $self->{'outbuffer'}
663 0 0 if ($self->{'memcached_compatibility'})
671 0 0 unless (defined $varname and length $varname)
678 0 0 if ($self->{'needreconnect'})
687 0 0 if ($self->{'needreconnect'})
691 0 0 unless length $self->{'outbuffer'}
698 0 0 if ($self->{'needreconnect'})
703 0 0 if ($self->{'inlines'}[$i] =~ /^RETRIEVED\ $varname/u or $self->{'inlines'}[$i] =~ /^NOTRETRIEVED\ $varname/u)
709 0 0 if defined $answerline
712 0 0 if ($answerline =~ /^RETRIEVED\ (.+?)\=(.*)/u)
714 0 0 if ($key ne $varname)
726 0 0 unless (defined $varname and length $varname)
731 0 0 if ($self->{'needreconnect'})
738 0 0 if ($self->{'needreconnect'})
742 0 0 unless length $self->{'outbuffer'}
746 0 0 if ($self->{'memcached_compatibility'})
754 0 0 unless (defined $varname and length $varname)
759 0 0 if ($self->{'needreconnect'})
763 0 0 if (not defined $stepsize or $stepsize eq '') { }
772 0 0 if ($self->{'needreconnect'})
776 0 0 unless length $self->{'outbuffer'}
780 0 0 if ($self->{'memcached_compatibility'})
788 0 0 unless (defined $varname and length $varname)
793 0 0 if ($self->{'needreconnect'})
797 0 0 if (not defined $stepsize or $stepsize eq '') { }
805 0 0 if ($self->{'needreconnect'})
809 0 0 unless length $self->{'outbuffer'}
813 0 0 if ($self->{'memcached_compatibility'})
821 0 0 if ($self->{'needreconnect'})
828 0 0 if ($self->{'needreconnect'})
832 0 0 unless length $self->{'outbuffer'}
836 0 0 if ($self->{'memcached_compatibility'})
844 0 0 if ($self->{'needreconnect'})
855 0 0 if ($self->{'needreconnect'})
859 0 0 unless length $self->{'outbuffer'}
868 0 0 if ($self->{'needreconnect'})
875 0 0 if ($self->{'inlines'}[$i] =~ /^KEYLISTSTART/u)
879 0 0 unless $liststartfound
880 0 0 if ($self->{'inlines'}[$i] =~ /^KEYLISTEND/u)
885 0 0 if $listendfound
893 0 0 if ($self->{'inlines'}[$idx] =~ /^KEYLISTSTART/u)
900 0 0 unless ($listfound)
905 0 0 if ($self->{'inlines'}[$idx] =~ /^KEYLISTEND/u)
910 0 0 if ($self->{'inlines'}[$idx] =~ /^KEY\ (.+)/u) { }
919 0 0 if ($self->{'memcached_compatibility'})
927 0 0 if ($self->{'needreconnect'})
938 0 0 if ($self->{'needreconnect'})
942 0 0 unless length $self->{'outbuffer'}
951 0 0 if ($self->{'needreconnect'})
958 0 0 if ($self->{'inlines'}[$i] =~ /^CLIENTLISTSTART/u)
962 0 0 unless $liststartfound
963 0 0 if ($self->{'inlines'}[$i] =~ /^CLIENTLISTEND/u)
968 0 0 if $listendfound
976 0 0 if ($self->{'inlines'}[$idx] =~ /^CLIENTLISTSTART/u)
983 0 0 unless ($listfound)
988 0 0 if ($self->{'inlines'}[$idx] =~ /^CLIENTLISTEND/u)
993 0 0 if ($self->{'inlines'}[$idx] =~ /^CLIENT\ (.+)/u) { }
1009 0 0 if ($self->{'memcached_compatibility'})
1017 0 0 if (not defined $flushid or $flushid eq "")
1021 0 0 if ($self->{'needreconnect'})
1030 0 0 if ($self->{'needreconnect'})
1034 0 0 unless length $self->{'outbuffer'}
1041 0 0 if ($self->{'needreconnect'})
1046 0 0 if ($self->{'inlines'}[$i] =~ /^FLUSHED\ $flushid/u)
1052 0 0 if defined $answerline
1063 0 0 if ($line->{'type'} eq "disconnect")
1074 0 0 unless (defined $command and length $command)
1079 0 0 if ($self->{'needreconnect'})
1092 0 0 unless (defined $varname and length $varname)
1097 0 0 unless (defined $value)
1102 0 0 unless (defined $forcesend)
1108 0 0 if ($self->{'memcached_compatibility'})
1111 0 0 if ($self->{'needreconnect'})
1115 0 0 unless length $self->{'outbuffer'}
1126 0 0 if ($self->{'needreconnect'})
1135 0 0 if time > $endtime
1137 0 0 unless length $self->{'outbuffer'}