line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::WebSocket::X::BadHeader; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
570
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
32
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
5
|
use parent qw( Net::WebSocket::X::Base ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub _new { |
9
|
3
|
|
|
3
|
|
270
|
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
|
|
|
18
|
my $str = defined($why) && length($why) ? "Bad “$name” header ($value_str): $why" : "Bad “$name” header ($value_str)"; |
21
|
|
|
|
|
|
|
|
22
|
3
|
|
|
|
|
11
|
return $class->SUPER::_new( $str, @args ); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |