Branch Coverage

blib/lib/WWW/Metaweb.pm
Criterion Covered Total %
branch 17 100 17.0


line true false branch
151 0 3 if exists $$options{'username'}
152 0 3 if exists $$options{'password'}
176 8 0 if (exists $$self{$key}) { }
191 0 3 if (defined $username and defined $password)
192 0 0 unless $self->authenticate($username, $password)
224 0 0 unless ($response->is_success)
229 0 0 unless ($raw_header = $response->header('Set_Cookie'))
278 0 1 if ($read_queries[$i] eq 'perl' or $read_queries[$i] eq 'json') { }
294 0 0 unless defined $self->send_read_envelope
301 0 0 @read_queries == 1 && !wantarray ? :
322 0 0 if ($write_queries[$i] eq 'perl' or $write_queries[$i] eq 'json') { }
335 0 0 unless defined $self->send_write_envelope
339 0 0 @write_queries == 1 && !wantarray ? :
366 0 0 unless ($guid =~ s/^(\#|\%23)([\da-f]+)$/%23$2/)
376 0 0 unless ($response->is_success)
479 0 2 unless $envelope = __test_envelope($method, 'add_query')
481 1 1 if (@_ == 1) { }
1 0 elsif (@_ > 1 and @_ % 2 == 0) { }
497 0 2 unless $self->check_query_syntax($method, $$queries{$query_name})
499 0 2 if (ref $query eq 'HASH' or ref $query eq 'ARRAY') { }
2 0 elsif (not ref $query) { }
501 0 0 if (ref $query eq 'HASH' and not defined $$query{'query'} or ref $query eq 'ARRAY' and not defined $$query[0]{'query'})
505 0 0 if $$self{'auto_cursors'} and not defined $$query{'cursor'}
512 0 0 if (ref $p_query eq 'HASH' and not defined $$p_query{'query'} or ref $p_query eq 'ARRAY' and not defined $$p_query[0]{'query'})
516 0 0 if $$self{'auto_cursors'} and not defined $$query{'cursor'}
539 0 1 unless $envelope = __test_envelope($method, 'clear_envelope')
557 0 0 unless $envelope = __test_envelope($method, 'query_count')
593 0 0 unless $envelope = __test_envelope($method, 'send_envelope')
600 0 0 if (ref $$self{'json_preprocessor'} eq 'CODE') { }
0 0 elsif (ref $$self{'json_preprocessor'} eq 'ARRAY') { }
605 0 0 if ref $sub eq 'CODE'
612 0 0 ref $$self{$envelope}{$query_name} ? :
619 0 0 unless defined $query
621 0 0 if $first == 0
628 0 0 if $$self{'debug'}
633 0 0 if ($method eq 'read') { }
647 0 0 unless ($response->is_success)
652 0 0 $self->set_result($method, $response->content) ? :
783 0 0 unless $envelope = __test_envelope($method, 'set_result')
789 0 0 unless ($status eq '200 OK')
796 0 0 ref $$self{$envelope}{$query_name} ? :
814 0 0 if (defined $result) { }
817 0 0 if ($code eq '/api/status/ok') { }
863 0 0 unless $self->result_is_ok($query_name)
866 0 0 unless defined $format
871 0 0 if ($format eq 'json') { }
915 3 0 if defined $new_useragent
930 3 0 if defined $new_server
931 3 0 unless $$self{'server'} =~ m[^http://]
982 3 0 if ($envelope eq 'read' or $envelope eq 'write') { }