Common/Procedure/Return/Version_2_0/Error.pm

filter: Statementstmt 100% 17 / 17 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 1 totaltotal 91.6% 22 / 24 CC 2 SCAR 3.5
CC
2
Cov
95%
deflate
2.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
« Common/Marshal/Text.pm ↑ Summary Common/Procedure/Return/Version_1_0.pm »
1 #!/usr/bin/perl
2  
3 package JSON::RPC::Common::Procedure::Return::Version_2_0::Error;
4 3 $JSON::RPC::Common::Procedure::Return::Version_2_0::Error::VERSION = '0.11';
5 3 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 # ABSTRACT: JSON-RPC 2.0 error class.
7  
8 3 ▶use JSON::RPC::Common::TypeConstraints qw(JSONValue);
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 3 ▶use namespace::clean -except => [qw(meta)];
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 3 extends qw(JSON::RPC::Common::Procedure::Return::Error);
13  
14 3 has '+message' => (
15 required => 1,
16 );
17  
18 3 has '+code' => (
19 default => -32603,
20 );
21  
22 3 ▶sub deflate {
Subroutine deflate: called CC=2 SCAR=7.2
Pod undocumented
23 3 my $self = shift;
24  
25 return {
26 3 ▶ code => $self->code,
Branch: 1 branch
BranchTrueFalseTotal
$self->has_data ? : 3 0 3
27 message => $self->message,
28 ( $self->has_data ? ( data => $self->data ) : () ),
29 };
30 }
31  
32 3 __PACKAGE__->meta->make_immutable;
33  
34 3 __PACKAGE__
35  
36 __END__
« Common/Marshal/Text.pm ↑ Summary Common/Procedure/Return/Version_1_0.pm »