WebSocket/Stateful.pm

filter: Statementstmt 70.5% 12 / 17 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 87.5% 7 / 8 Podpod 100% 6 / 6 totaltotal 77.1% 27 / 35 CC 3 SCAR 7.9
CC
3
Cov
67%
new
6.0
state
2.0
BEGIN
1.0
CRAP 2.2
« WebSocket/Cookie.pm ↑ Summary WebSocket.pm »
1 package Protocol::WebSocket::Stateful;
2  
3 21 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 21 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 0 ▶sub new {
Subroutine new: not called CC=2 SCAR=17.9
Pod documented
7 0 my $class = shift;
8 0 ▶ $class = ref $class if ref $class;
Branch: 1 branch
BranchTrueFalseTotal
if ref $class 0 0 0
9  
10 0 my $self = {@_};
11 0 bless $self, $class;
12  
13 0 return $self;
14 }
15  
16 2002 ▶sub state { @_ > 1 ? $_[0]->{state} = $_[1] : $_[0]->{state} }
Subroutine state: called CC=2 SCAR=6.9
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
@_ > 1 ? : 255 1747 2002
17  
18 44 ▶sub done { shift->state('done') }
Subroutine done: called CC=1 SCAR=0.0
Pod documented
19 1430 ▶sub is_state { shift->state eq shift }
Subroutine is_state: called CC=1 SCAR=0.0
Pod documented
20 258 ▶sub is_body { shift->is_state('body') }
Subroutine is_body: called CC=1 SCAR=0.0
Pod documented
21 427 ▶sub is_done { shift->is_state('done') }
Subroutine is_done: called CC=1 SCAR=0.0
Pod documented
22  
23 21 1;
24 __END__
« WebSocket/Cookie.pm ↑ Summary WebSocket.pm »