WebSocket/X/UnsupportedProtocolVersion.pm

filter: Statementstmt 100% 14 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 100% 18 / 18 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« WebSocket/X/ReceivedBadDataFrame.pm ↑ Summary
1 package Net::WebSocket::X::UnsupportedProtocolVersion;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 ▶use parent qw( Net::WebSocket::X::Base );
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 ▶sub _new {
Subroutine _new: called CC=1 SCAR=0.0
9 2 my ($class, $version) = @_;
10  
11 2 my $str = "Received invalid WebSocket version in handshake: $version";
12  
13 2 $str .= " - must be " . Net::WebSocket::Constants::PROTOCOL_VERSION();
14  
15 2 return $class->SUPER::_new(
16 $str,
17 version => $version,
18 );
19 }
20  
21 2 1;
« WebSocket/X/ReceivedBadDataFrame.pm ↑ Summary