line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::WebSocket::X::BadHeader; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
557
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
4
|
1
|
|
|
1
|
|
9
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
14
|
use parent qw( Net::WebSocket::X::Base ); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
4
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub _new { |
9
|
3
|
|
|
3
|
|
291
|
my ($class, $name => $value, $why) = @_; |
10
|
|
|
|
|
|
|
|
11
|
3
|
|
|
|
|
9
|
my @args = ( |
12
|
|
|
|
|
|
|
name => $name, |
13
|
|
|
|
|
|
|
value => $value, |
14
|
|
|
|
|
|
|
why => $why, |
15
|
|
|
|
|
|
|
); |
16
|
|
|
|
|
|
|
|
17
|
3
|
50
|
|
|
|
8
|
my $value_str = defined($value) ? $value : q<>; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
#Perl 5.10 still warns on length(undef) |
20
|
3
|
100
|
66
|
|
|
30
|
my $str = defined($why) && length($why) ? "Bad “$name” header ($value_str): $why" : "Bad “$name” header ($value_str)"; |
21
|
|
|
|
|
|
|
|
22
|
3
|
|
|
|
|
12
|
return $class->SUPER::_new( $str, @args ); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |