Branch Coverage

blib/lib/Mojo/WebSocketProxy/Dispatcher.pm
Criterion Covered Total %
branch 25 36 69.4


line true false branch
60 0 23 if $config->{'stream_timeout'}
61 0 23 if $config->{'max_connections'}
63 0 23 if $config->{'opened_connection'}
73 0 34 unless (my $decoded = eval { do { &Encode::decode_utf8($msg, 1) } })
84 0 34 unless (my $normalized_msg = eval { do { &Unicode::Normalize::NFC($decoded) } })
94 1 33 unless (my $args = eval { do { decode_json_text($normalized_msg) } })
110 1 0 if $bytes and exists $config->{'binary_frame'}
113 0 23 if $config->{'finish_connection'}
127 0 33 if (my $err = Mojo::WebSocketProxy::Parser::parse_req($c, $req_storage))
132 2 31 unless (my $action = $c->dispatch($args))
145 2 21 if $req_storage->{'instead_of_forward'}
168 8 23 if $result
186 7 55 ref $_->{'before_forward'} eq 'ARRAY' ? :
209 10 9 unless my $result = &$hook($c, @hook_params)
210 4 5 if &blessed($result) and $result->isa('Future')
240 0 69 ref $config->{$hook} eq 'ARRAY' ? :
0 69 ref $req_storage->{$hook} eq 'ARRAY' ? :
245 0 23 unless my $backend = $c->wsp_config->{'backends'}{$backend_name}