Branch Coverage

blib/lib/Net/WebSocket/Frame/close.pm
Criterion Covered Total %
branch 18 22 81.8


line true false branch
122 44 1 unless ($opts{'payload_sr'} or defined $opts{'payload'})
125 39 5 if (my $code = delete $opts{'code'}) { }
127 9 30 unless ($num)
130 3 6 unless ($num =~ /\A[1-4][0-9]{3}\z/)
134 5 1 unless (Net::WebSocket::Constants::status_code_to_name($num))
135 0 5 if ($num < 4000 or $num > 4999)
144 20 16 if (defined $reason)
145 0 20 if (length $reason > 123)
155 0 5 if (defined $reason and length $reason)
174 0 49 if ($self->get_type ne 'close')
179 6 43 unless (length ${$$self[$self->PAYLOAD];})