Branch Coverage

blib/lib/Net/Async/CassandraCQL.pm
Criterion Covered Total %
branch 78 138 56.5


line true false branch
199 5 6 if (defined $params{'host'})
206 12 120 if exists $params{$_}
209 7 4 if (exists $params{'primaries'})
228 0 0 $addrlen == 16 ? :
12 0 $addrlen == 4 ? :
274 1 3 if $str =~ /^[a-z_][a-z0-9_]+$/
313 0 0 if ($host =~ s/:(\d+)$//)
336 0 0 if $conn->parent
348 0 2 unless $$self{'nodes'}
349 0 2 unless my $node = $$self{'nodes'}{$nodeid}
355 2 0 if (exists $$self{'primary_ids'}{$nodeid})
362 2 0 if (exists $$self{'event_ids'}{$nodeid})
376 2 5 if (defined(my $dc = $$self{'prefer_dc'}))
392 0 6 unless $$self{'hosts'}
394 0 6 defined $args{'host'} ? :
0 6 $args{'hosts'} ? :
395 0 6 unless @hosts
412 5 11 if ($$node{'host'} eq $conn->nodeid)
433 0 4 if $primary eq $conn->nodeid
440 2 3 if $have_primaries > 1
442 3 2 if @conn_f == 1
461 0 8 if defined $$node{'down_time'} and $now - $$node{'down_time'} > 60
463 2 6 if $$self{'primary_ids'}{$nodeid}
465 4 2 unless $$node{'down_time'}
468 0 2 unless (defined $new_primary)
502 0 12 unless my $node = $$self{'nodes'}{$nodeid}
503 0 12 unless my $conn = $$node{'conn'}
507 0 12 $keyspace ? :
513 0 12 unless my $queries_by_cql = $$self{'queries_by_cql'}
514 11 1 unless keys %$queries_by_cql
517 0 1 unless my $query = (shift())->{'query'}
533 0 9 unless @primaries
539 0 9 unless my $node = $$self{'nodes'}{$nodeid}
568 1 1 if ($type eq 'NEW_NODE') { }
1 0 elsif ($type eq 'REMOVED_NODE') { }
569 0 1 if exists $$nodes{$nodeid}
589 0 1 unless exists $$nodes{$nodeid}
604 0 3 unless my $node = $$nodes{$nodeid}
609 1 2 if ($status eq 'DOWN') { }
2 0 elsif ($status eq 'UP') { }
610 0 1 if exists $$node{'down_time'}
618 0 2 unless exists $$node{'down_time'}
625 1 1 unless defined(my $dc = $$self{'prefer_dc'})
626 0 1 unless $$node{'data_center'} eq $dc
627 0 1 if $$node{'conn'}
635 0 1 unless defined $old_nodeid
674 1 1 unless my $conn = $$node{'conn'}
703 0 0 unless my $conn = $$node{'conn'}
712 0 19 unless my $nodes = $$self{'nodes'}
719 0 19 unless @nodeids = keys %{$$self{'primary_ids'};}
730 0 2 if $next_ready == $next
735 19 0 if (my $node = $$nodes{$nodeids[0]})
797 0 0 if ($f->failure) { }
0 0 elsif (my($type, $result) = $f->get) { }
801 0 0 if ($type eq 'rows') { }
0 0 elsif ($type eq 'schema_change') { }
812 0 19 if $IO::Async::Notifier::DEBUG
823 0 15 unless defined $consistency
846 0 1 unless defined $type
847 0 1 unless $type eq 'rows'
868 0 5 unless my $nodes = $$self{'nodes'}
872 2 3 if (my $q = $$queries_by_cql{$cql})
874 1 1 if ($$q{'pacemaker'})
918 1 0 if ($$q{'ttl'} <= 0 or refcount($self) == 2 or not $self->loop) { }
939 0 3 unless my $q = $$queries_by_cql{$cql}
947 3 0 if ($self->loop)
973 0 4 unless defined $consistency
1071 0 5 unless $type eq 'rows'
1079 0 5 unless $type eq 'rows'