Branch Coverage

blib/lib/Protocol/WebSocket/Message.pm
Criterion Covered Total %
branch 61 70 87.1


line true false branch
15 0 112 if ref $class
35 23 254 @_ > 1 ? :
43 486 218 unless @_
53 518 11 unless @_
63 27 341 @_ > 1 ? :
66 64 432 @_ > 1 ? :
67 45 592 @_ > 1 ? :
69 67 438 @_ > 1 ? :
71 3 16 @_ > 1 ? :
72 3 16 @_ > 1 ? :
73 14 56 @_ > 1 ? :
78 9 19 if (@_)
83 4 15 if defined $self->{'checksum'}
85 0 15 unless defined $self->number1
86 0 15 unless defined $self->number2
87 0 15 unless defined $self->challenge
101 11 254 unless defined $_[0]
103 0 254 if $self->error
105 2 252 unless $self->_append(@_)
108 48 236 if ($self->state eq 'first_line') { }
197 39 elsif ($line ne '') { }
109 6 42 unless defined $self->_parse_first_line($line)
114 0 197 unless defined $self->_parse_field($line)
122 197 49 unless $self->is_state('body')
125 1 48 unless defined $rv
128 4 44 unless ref $rv
130 9 35 unless &readonly($_[0]) or ref $_[0]
141 0 22 if $spaces == 0
149 0 254 if $self->error
151 8 246 if (ref $_[0]) { }
157 17 229 unless &readonly($_[0])
160 2 252 if (length $self->{'buffer'} > $self->{'max_message_size'})
171 284 197 if ($self->{'buffer'} =~ s/^(.*?)\x0d?\x0a//)
185 0 197 unless (defined $name and defined $value)
193 1 196 if ($name =~ /^x-forwarded-proto$/i)