MailboxOrg/JSONRPCResponse.pm

filter: Statementstmt 100% 9 / 9 Branchbran n/a Conditioncond 66.6% 2 / 3 MC/DCmcdc 50.0% 1 / 2 Subroutinesub 100% 2 / 2 Podpod 100% 1 / 1 totaltotal 88.2% 15 / 17 CC 2 SCAR 5.2
CC
2
Cov
92%
is_success
2.0
BEGIN
1.0
CRAP 1.7
« MailboxOrg/API/Videochat.pm ↑ Summary MailboxOrg/API/Blacklist.pm »
1 package WWW::MailboxOrg::JSONRPCResponse;
2  
3 # ABSTRACT: JSON-RPC 2.0 response object
4  
5 5 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7  
8 5 has result => (
9 is => 'ro',
10 predicate => 'has_result',
11 );
12  
13  
14 5 has error => (
15 is => 'ro',
16 predicate => 'has_error',
17 );
18  
19  
20 5 has id => (
21 is => 'ro',
22 predicate => 'has_id',
23 );
24  
25  
26 2 ▶sub is_success {
Subroutine is_success: called CC=2 SCAR=7.1
Pod documented
27 2 my ($self) = @_;
28 2 ▶ return $self->has_result && !$self->has_error;
Condition66%2/3
$self->has_result && !$self->has_error
!ll&&!rl&&r
101
MC/DC50%1/2
$self->has_result && !$self->has_error
$self->has_result !$self->has_error
Truth table66%2/3
A && not(B)
A= $self->has_resultB= !$self->has_error
ABresult
0X0
100
111
29 }
30  
31  
32 5 1;
33  
34 __END__
« MailboxOrg/API/Videochat.pm ↑ Summary MailboxOrg/API/Blacklist.pm »