File Coverage

blib/lib/Thunderhorse/WebSocket.pm
Criterion Covered Total %
statement 17 26 65.3
branch 1 2 50.0
condition n/a
subroutine 5 6 83.3
pod 1 2 50.0
total 24 36 66.6


line stmt bran cond sub pod time code
1             package Thunderhorse::WebSocket;
2             $Thunderhorse::WebSocket::VERSION = '0.102';
3 21     21   350 use v5.40;
  21         80  
4 21     21   142 use Mooish::Base -standard;
  21         67  
  21         227  
5              
6 21     21   336478 use Future::AsyncAwait;
  21         48  
  21         218  
7 21     21   1713 use Gears::X::Thunderhorse;
  21         48  
  21         6175  
8              
9             extends 'PAGI::WebSocket';
10             with 'Thunderhorse::Message';
11              
12 3         7 sub FOREIGNBUILDARGS ($class, %args)
13 3     3 0 2821 {
  3         9  
  3         5  
14             Gears::X::Thunderhorse->raise('no context for websocket')
15 3 50       11 unless $args{context};
16              
17 3         34 return $args{context}->pagi->@*;
18             }
19              
20 0           sub update ($self, $scope, $receive, $send)
  0            
  0            
21 0     0 1   {
  0            
  0            
22 0           $self->{scope} = $scope;
23 0           $self->{receive} = $receive;
24 0           $self->{send} = $send;
25             }
26              
27             __END__