Branch Coverage

blib/lib/Net/Async/CassandraCQL.pm
Criterion Covered Total %
branch 76 128 59.3


line true false branch
191 5 6 if (defined $params{'host'})
198 12 120 if exists $params{$_}
201 7 4 if (exists $params{'primaries'})
220 0 0 $addrlen == 16 ? :
12 0 $addrlen == 4 ? :
266 1 3 if $str =~ /^[a-z_][a-z0-9_]+$/
321 0 0 if $conn->parent
333 0 2 unless $$self{'nodes'}
334 0 2 unless my $node = $$self{'nodes'}{$nodeid}
340 2 0 if (exists $$self{'primary_ids'}{$nodeid})
347 1 1 if (exists $$self{'event_ids'}{$nodeid})
361 2 5 if (defined(my $dc = $$self{'prefer_dc'}))
377 0 6 unless $$self{'hosts'}
379 0 6 defined $args{'host'} ? :
0 6 $args{'hosts'} ? :
380 0 6 unless @hosts
397 5 11 if ($$node{'host'} eq $conn->nodeid)
418 2 4 if $primary eq $conn->nodeid
425 2 2 if $have_primaries > 1
427 2 2 if @conn_f == 1
446 0 8 if defined $$node{'down_time'} and $now - $$node{'down_time'} > 60
448 2 6 if $$self{'primary_ids'}{$nodeid}
450 4 2 unless $$node{'down_time'}
453 0 2 unless (defined $new_primary)
487 0 12 unless my $node = $$self{'nodes'}{$nodeid}
488 0 12 unless my $conn = $$node{'conn'}
492 0 12 $keyspace ? :
498 0 12 unless my $queries_by_cql = $$self{'queries_by_cql'}
499 11 1 unless keys %$queries_by_cql
502 0 1 unless my $query = (shift())->[0]
517 0 8 if $$self{'event_ids'}{$nodeid}
548 1 1 if ($type eq 'NEW_NODE') { }
1 0 elsif ($type eq 'REMOVED_NODE') { }
549 0 1 if exists $$nodes{$nodeid}
569 0 1 unless exists $$nodes{$nodeid}
584 0 3 unless my $node = $$nodes{$nodeid}
589 1 2 if ($status eq 'DOWN') { }
2 0 elsif ($status eq 'UP') { }
590 0 1 if exists $$node{'down_time'}
598 0 2 unless exists $$node{'down_time'}
605 1 1 unless defined(my $dc = $$self{'prefer_dc'})
606 0 1 unless $$node{'data_center'} eq $dc
607 0 1 if $$node{'conn'}
615 0 1 unless defined $old_nodeid
654 1 1 unless my $conn = $$node{'conn'}
683 0 0 unless my $conn = $$node{'conn'}
692 0 19 unless my $nodes = $$self{'nodes'}
699 0 19 unless @nodeids = keys %{$$self{'primary_ids'};}
710 0 3 if $next_ready == $next
715 19 0 if (my $node = $$nodes{$nodeids[0]})
777 0 0 if ($f->failure) { }
0 0 elsif (my($type, $result) = $f->get) { }
781 0 0 if ($type eq 'rows') { }
0 0 elsif ($type eq 'schema_change') { }
792 0 19 if $IO::Async::Notifier::DEBUG
803 0 15 unless defined $consistency
826 0 1 unless $type eq 'rows'
847 0 5 unless my $nodes = $$self{'nodes'}
851 2 3 if (my $q = $$queries_by_cql{$cql})
853 1 1 if ($$q[1])
887 0 3 unless my $q = $$queries_by_cql{$cql}
920 0 4 unless defined $consistency
1018 0 5 unless $type eq 'rows'
1026 0 5 unless $type eq 'rows'