WebSocket/X/BadHeader.pm untested

filter: Statementstmt 0.0% 0 / 14 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 23 SCAR 24.8
CC
3
Cov
0%
_new
12.0
BEGIN
2.0
BEGIN
2.0
CRAP 12.0
1 package Net::WebSocket::X::BadHeader;
2  
3 use strict;
4 use warnings;
5  
6 use parent qw( Net::WebSocket::X::Base );
7  
8 sub _new {
9 my ($class, $name => $value, $why) = @_;
10  
11 my @args = (
12 name => $name,
13 value => $value,
14 why => $why,
15 );
16  
17 my $value_str = defined($value) ? $value : q<>;
18  
19 my $str = length($why) ? "Bad “$name” header ($value_str): $why" : "Bad “$name” header ($value_str)";
20  
21 return $class->SUPER::_new( $str, @args );
22 }
23  
24 1;