| 1 | package Protocol::WebSocket::Handshake; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | 9 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 9 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | |||||||||||||||||||||
| 6 | 9 | ▶ | use Protocol::WebSocket::Request; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 7 | 9 | ▶ | use Protocol::WebSocket::Response; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 8 | |||||||||||||||||||||
| 9 | 28 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||||||||||||
| 10 | 28 | my $class = shift; | |||||||||||||||||||
| 11 | 28 | ▶ | $class = ref $class if ref $class; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | 28 | my $self = {@_}; | |||||||||||||||||||
| 14 | 28 | bless $self, $class; | |||||||||||||||||||
| 15 | |||||||||||||||||||||
| 16 | 28 | return $self; | |||||||||||||||||||
| 17 | } | ||||||||||||||||||||
| 18 | |||||||||||||||||||||
| 19 | 17 | ▶ | sub error { @_ > 1 ? $_[0]->{error} = $_[1] : $_[0]->{error} } | ||||||||||||||||||
|
Subroutine
error: called CC=2 SCAR=6.9
Pod
documented
Branch: 1 branch
| |||||||||||||||||||||
| 20 | |||||||||||||||||||||
| 21 | 0 | ▶ | sub version { $_[0]->req->version } | ||||||||||||||||||
|
Subroutine
version: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 22 | |||||||||||||||||||||
| 23 | 188 | ▶ | sub req { shift->{req} ||= Protocol::WebSocket::Request->new } | ||||||||||||||||||
|
Subroutine
req: called CC=2 SCAR=7.2
Pod
documented
Condition66%2/3
+(shift())->{"req"} ||= "Protocol::WebSocket::Request"->new
MC/DC0%0/2
+(shift())->{"req"} ||= "Protocol::WebSocket::Request"->new
+(shift())->{"req"}
"Protocol::WebSocket::Request"->new
Truth table66%2/3
A ||= B
A= +(shift())->{"req"}B= "Protocol::WebSocket::Request"->new
| |||||||||||||||||||||
| 24 | 97 | ▶ | sub res { shift->{res} ||= Protocol::WebSocket::Response->new } | ||||||||||||||||||
|
Subroutine
res: called CC=2 SCAR=7.2
Pod
documented
Condition66%2/3
+(shift())->{"res"} ||= "Protocol::WebSocket::Response"->new
MC/DC0%0/2
+(shift())->{"res"} ||= "Protocol::WebSocket::Response"->new
+(shift())->{"res"}
"Protocol::WebSocket::Response"->new
Truth table66%2/3
A ||= B
A= +(shift())->{"res"}B= "Protocol::WebSocket::Response"->new
| |||||||||||||||||||||
| 25 | |||||||||||||||||||||
| 26 | 9 | 1; | |||||||||||||||||||
| 27 | __END__ | ||||||||||||||||||||