Message.pm

filter: Statementstmt 100% 22 / 22 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 10 / 10 Podpod 100% 6 / 6 totaltotal 100% 38 / 38 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Connection.pm ↑ Summary
1 package AnyEvent::WebSocket::Message;
2  
3 15 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 15 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 15 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 15 ▶use Encode ();
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 # ABSTRACT: WebSocket message for AnyEvent
9 15 our $VERSION = '0.55'; # VERSION
10  
11  
12 15 has body => ( is => 'ro', required => 1 );
13 15 has opcode => ( is => 'ro', default => 1 );
14  
15  
16 sub decoded_body
17 20 ▶{
Subroutine decoded_body: called CC=1 SCAR=0.0
Pod documented
18 20 Encode::decode("UTF-8", shift->body)
19 }
20  
21  
22 115 ▶sub is_text { $_[0]->opcode == 1 }
Subroutine is_text: called CC=1 SCAR=0.0
Pod documented
23 42 ▶sub is_binary { $_[0]->opcode == 2 }
Subroutine is_binary: called CC=1 SCAR=0.0
Pod documented
24 31 ▶sub is_close { $_[0]->opcode == 8 }
Subroutine is_close: called CC=1 SCAR=0.0
Pod documented
25 6 ▶sub is_ping { $_[0]->opcode == 9 }
Subroutine is_ping: called CC=1 SCAR=0.0
Pod documented
26 5 ▶sub is_pong { $_[0]->opcode == 10 }
Subroutine is_pong: called CC=1 SCAR=0.0
Pod documented
27  
28 15 1;
29  
30 __END__
« Connection.pm ↑ Summary