Branch Coverage

blib/lib/Net/Async/Matrix.pm
Criterion Covered Total %
branch 45 102 44.1


line true false branch
224 26 364 if exists $params{$_}
240 0 0 if $self->{'on_log'}
246 113 1 if not ref $v or &blessed($v)
247 0 1 if ref $v ne 'HASH'
256 1 56 unless $path =~ m[^/]
259 0 57 $self->{'SSL'} ? :
263 57 0 if defined $self->{'access_token'}
279 0 29 unless $response->content_type eq 'application/json'
302 0 13 unless $response->content_type eq 'application/json'
306 13 0 if (length $content and $content ne '""') { }
307 0 13 unless eval { do { $content = &decode_json($content); 1 } }
350 1 0 if (defined $params{'content'}) { }
0 0 elsif (defined $params{'file'} or defined $params{'fh'}) { }
357 0 0 unless $fh or open $fh, '<', $params{'file'}
360 0 0 unless $fh->read(my $buffer, 65536)
372 0 1 unless $response->content_type eq 'application/json'
377 1 0 if (length $content and $content ne '""') { }
378 0 1 unless eval { do { $content = &decode_json($content); 1 } }
428 13 1 if (defined $params{'user_id'} and defined $params{'access_token'})
433 12 1 $self->{'enable_events'} // 1 ? :
443 0 1 unless my($type) = $flow->{'type'} =~ /^m\.login\.(.*)$/
446 0 1 unless my $code = $self->can("_login_with_$type")
447 0 1 unless my $f = &$code($self, %params)
461 0 1 unless defined $params{'user_id'} and defined $params{'password'}
467 1 0 if defined $resp->{'access_token'}
494 0 0 $flow->{'stages'} ? :
500 0 0 unless my($type) = $stage =~ /^m\.login\.(.*)$/
503 0 0 unless my $method = $self->can("_register_with_$type")
504 0 0 unless my $code = &$method($self, %params)
517 0 0 if defined $resp->{'access_token'}
531 0 0 unless defined(my $password = $params{'password'})
552 0 0 unless defined(my $secret = $params{'captcha_bypass_secret'}) and defined $params{'user_id'}
626 0 16 unless defined $self->{'access_token'}
638 1 13 if defined $self->{'first_sync_limit'}
665 4 0 if $self->{'start_f'}
718 4 12 if $self->{'longpoll_f'}
734 0 7 if $self->{'rooms_by_id'}{$room_id}
739 0 14 if $$self{"on_room_$_"}
805 68 16 unless my $rooms = $sync->{'rooms'}{$category}
899 0 0 if defined $msg
915 0 0 if defined $event->{$_}
962 0 0 if defined $room_alias
993 0 6 if (my $room = $self->{'rooms_by_id'}{$room_id}) { }
1102 0 1 unless defined $params{'content_type'}
1105 0 0 unless defined $params{'content'} or defined $params{'file'} or defined $params{'fh'}
1130 1 0 unless &blessed($mxc) and $mxc->isa('URI')
1133 0 1 unless $mxc->scheme eq 'mxc'
1137 0 1 $self->{'SSL'} ? :
1156 1 1 unless defined $content->{$_}
1157 0 1 if defined $user->$_ and $content->{$_} eq $user->$_
1163 0 1 if (defined $content->{'last_active_ago'})