WebSocket/X/BadHTTPStatus.pm untested

filter: Statementstmt 0.0% 0 / 17 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 25 CC 2 SCAR 12.0
CC
2
Cov
0%
_new
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 3.3
1 package Net::WebSocket::X::BadHTTPStatus;
2  
3 use strict;
4 use warnings;
5  
6 use Net::WebSocket::Constants ();
7  
8 use parent qw( Net::WebSocket::X::Base );
9  
10 sub _new {
11 my ($class, $code, $reason) = @_;
12  
13 my $str = "Received invalid HTTP status: $code";
14 $str .= " ($reason)" if defined $reason;
15  
16 $str .= " - must be " . Net::WebSocket::Constants::REQUIRED_HTTP_STATUS();
17  
18 return $class->SUPER::_new(
19 $str,
20 code => $code,
21 reason => $reason,
22 );
23 }
24  
25 1;