Branch Coverage

blib/lib/Net/Async/Matrix.pm
Criterion Covered Total %
branch 37 90 41.1


line true false branch
215 25 339 if exists $params{$_}
231 0 0 if $self->{'on_log'}
239 1 56 unless $path =~ m[^/]
242 0 57 $self->{'SSL'} ? :
246 57 0 if defined $self->{'access_token'}
260 0 29 unless $response->content_type eq 'application/json'
283 0 13 unless $response->content_type eq 'application/json'
287 13 0 if (length $content and $content ne '""') { }
288 0 13 unless eval { do { $content = &decode_json($content); 1 } }
331 1 0 if (defined $params{'content'}) { }
0 0 elsif (defined $params{'file'} or defined $params{'fh'}) { }
338 0 0 unless $fh or open $fh, '<', $params{'file'}
341 0 0 unless $fh->read(my $buffer, 65536)
353 0 1 unless $response->content_type eq 'application/json'
358 1 0 if (length $content and $content ne '""') { }
359 0 1 unless eval { do { $content = &decode_json($content); 1 } }
409 13 1 if (defined $params{'user_id'} and defined $params{'access_token'})
414 12 1 $self->{'enable_events'} // 1 ? :
424 0 1 unless my($type) = $flow->{'type'} =~ /^m\.login\.(.*)$/
427 0 1 unless my $code = $self->can("_login_with_$type")
428 0 1 unless my $f = &$code($self, %params)
442 0 1 unless defined $params{'user_id'} and defined $params{'password'}
448 1 0 if defined $resp->{'access_token'}
475 0 0 $flow->{'stages'} ? :
481 0 0 unless my($type) = $stage =~ /^m\.login\.(.*)$/
484 0 0 unless my $method = $self->can("_register_with_$type")
485 0 0 unless my $code = &$method($self, %params)
498 0 0 if defined $resp->{'access_token'}
512 0 0 unless defined(my $password = $params{'password'})
533 0 0 unless defined(my $secret = $params{'captcha_bypass_secret'}) and defined $params{'user_id'}
607 0 16 unless defined $self->{'access_token'}
641 4 0 if $self->{'start_f'}
694 4 12 if $self->{'longpoll_f'}
710 0 7 if $self->{'rooms_by_id'}{$room_id}
715 0 14 if $$self{"on_room_$_"}
781 68 16 unless my $rooms = $sync->{'rooms'}{$category}
875 0 0 if defined $msg
891 0 0 if defined $event->{$_}
938 0 0 if defined $room_alias
969 0 6 if (my $room = $self->{'rooms_by_id'}{$room_id}) { }
1078 0 1 unless defined $params{'content_type'}
1081 0 0 unless defined $params{'content'} or defined $params{'file'} or defined $params{'fh'}
1102 1 1 unless defined $content->{$_}
1103 0 1 if defined $user->$_ and $content->{$_} eq $user->$_
1109 0 1 if (defined $content->{'last_active_ago'})