| blib/lib/Net/WebSocket/Frame/close.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| branch | 13 | 20 | 65.0 |
| line | true | false | branch |
|---|---|---|---|
| 122 | 5 | 1 | unless ($opts{'payload_sr'} or defined $opts{'payload'}) |
| 125 | 5 | 0 | if (my $code = delete $opts{'code'}) { } |
| 127 | 2 | 3 | unless ($num) |
| 130 | 0 | 2 | unless ($num =~ /\A[0-9]{4}\z/) |
| 134 | 2 | 0 | unless (Net::WebSocket::Constants::status_code_to_name($num)) |
| 135 | 0 | 2 | if ($num < 4000 or $num > 4999) |
| 144 | 5 | 0 | if (defined $reason) |
| 145 | 0 | 5 | if (length $reason > 123) |
| 168 | 0 | 20 | if ($self->get_type ne 'close') |
| 173 | 5 | 15 | unless (length ${$$self[$self->PAYLOAD];}) |