Condition Coverage

blib/lib/Protocol/WebSocket/Frame.pm
Criterion Covered Total %
condition 28 40 70.0


and 3 conditions

line !l l&&!r l&&r condition
49 53 0 18 defined $self->{'type'} and defined $TYPES{$self->{'type'}}
179 1 154 2 $self->{'max_payload_size'} and $payload_len > $self->{'max_payload_size'}
205 22 132 1 @{$self->{'fragments'};} and $opcode & 8
244 2 1 1 $self->{'type'} and $self->{'type'} eq 'close'
251 4 32 2 $self->{'max_payload_size'} and length $self->{'buffer'} > $self->{'max_payload_size'}
258 29 0 7 $self->{'rsv'} and ref $self->{'rsv'} eq 'ARRAY'

or 2 conditions

line l !l condition
53 5 66 $self->{'version'} ||= 'draft-ietf-hybi-17'
57 0 71 $self->{'max_fragments_amount'} ||= 128

or 3 conditions

line l !l&&r !l&&!r condition
58 0 60 0 $self->{'max_payload_size'} ||= $MAX_PAYLOAD_SIZE
115 0 20 33 $self->version eq 'draft-hixie-75' or $self->version eq 'draft-ietf-hybi-00'
168 0 0 5 $Protocol::WebSocket::Frame::Config{'ivsize'} <= 4 or $Protocol::WebSocket::Frame::Config{'longsize'} < 8
0 0 5 $Protocol::WebSocket::Frame::Config{'ivsize'} <= 4 or $Protocol::WebSocket::Frame::Config{'longsize'} < 8 or $] < 5.01
241 0 4 38 $self->version eq 'draft-hixie-75' or $self->version eq 'draft-ietf-hybi-00'
289 1 6 0 $self->{'mask'} || (&MATH_RANDOM_SECURE() ? Math::Random::Secure::irand(4294967296) : int rand 4294967296)