MailboxOrg/Role/API.pm

filter: Statementstmt 100% 10 / 10 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 93.3% 14 / 15 CC 2 SCAR 4.2
CC
2
Cov
92%
_rpc
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.5
« MailboxOrg/API/Spamprotect.pm ↑ Summary MailboxOrg/API/Validate.pm »
1 package WWW::MailboxOrg::Role::API;
2  
3 # ABSTRACT: Shared API controller behavior (client, _rpc)
4  
5 5 ▶use Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 5 ▶use Carp qw(croak);
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8  
9 47 ▶sub _rpc {
Subroutine _rpc: called CC=2 SCAR=7.1
10 47 my ( $self, $method, @params ) = @_;
11 47 ▶ my $client = $self->client or croak "No client set";
Branch: 1 branch
BranchTrueFalseTotal
my $client = $self->client or croak("No client set") 47 0 47
12 47 return $client->call( $method, @params );
13 }
14  
15 5 1;
16  
17 __END__
« MailboxOrg/API/Spamprotect.pm ↑ Summary MailboxOrg/API/Validate.pm »