| lib/PAGI/App/WebSocket/Chat.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| condition | 10 | 34 | 29.4 |
| line | !l | l&&!r | l&&r | condition |
|---|---|---|---|---|
| 94 | 0 | 0 | 0 | keys %rooms >= $max_rooms and not $rooms{$room} |
| 108 | 0 | 0 | 0 | $room and $user_rooms{$user_id}{$room} |
| 133 | 0 | 0 | 0 | $room and $rooms{$room} |
| 215 | 0 | 0 | 3 | defined $exclude_id and $id eq $exclude_id |
| line | l | !l | condition |
|---|---|---|---|
| 30 | 0 | 3 | $args{'default_room'} // "lobby" |
| 0 | 3 | $args{'max_rooms'} // 100 | |
| 69 | 2 | 0 | $event->{'text'} // "{}" |
| 2 | 0 | eval { do { &JSON::MaybeXS::decode_json(scalar($event->{'text'} // "{}")) } } // {} | |
| 70 | 2 | 0 | $data->{'type'} // "message" |
| 74 | 0 | 0 | $data->{'message'} // "" |
| 172 | 0 | 3 | $rooms{$room} //= {"users", {}} |
| 207 | 3 | 3 | $exclude_id //= undef |
| line | l | !l&&r | !l&&!r | condition |
|---|---|---|---|---|
| 93 | 0 | 0 | 0 | $data->{'room'} // $default_room |
| 116 | 1 | 0 | 0 | $data->{'username'} // $username |