Manager/Serializer/JSON.pm

filter: Statementstmt 100% 18 / 18 Branchbran n/a Conditioncond 66.6% 2 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 7 / 7 Podpod 100% 2 / 2 totaltotal 90.6% 29 / 32 CC 2 SCAR 2.4
CC
2
Cov
95%
_json
2.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« Manager/Service/Echo.pm ↑ Summary Manager/Client/MariaDB.pm »
1 package IPC::Manager::Serializer::JSON;
2 468 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 468 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 468 our $VERSION = '0.000035';
6  
7 468 ▶use parent 'IPC::Manager::Serializer';
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 468 ▶use Cpanel::JSON::XS;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 468 my $JSON;
12  
13 sub _json {
14 3716 ▶ return $JSON //= Cpanel::JSON::XS->new->ascii(1)->convert_blessed(1)->allow_nonref(1);
Subroutine _json: called CC=2 SCAR=7.2
Condition66%2/3
$JSON //= "Cpanel::JSON::XS"->new->ascii(1)->convert_blessed(1)->allow_nonref(1)
l!l&&r!l&&!r
34882280
MC/DC0%0/2
$JSON //= "Cpanel::JSON::XS"->new->ascii(1)->convert_blessed(1)->allow_nonref(1)
$JSON "Cpanel::JSON::XS"->new->ascii(1)->convert_blessed(1)->allow_nonref(1)
Truth table66%2/3
A //= B
A= $JSONB= "Cpanel::JSON::XS"->new->ascii(1)->convert_blessed(1)->allow_nonref(1)
ABresult
1X1
011
000
15 }
16  
17 1990 ▶sub serialize { _json()->encode($_[1]) }
Subroutine serialize: called CC=1 SCAR=0.0
Pod documented
18 1726 ▶sub deserialize { _json()->decode($_[1]) }
Subroutine deserialize: called CC=1 SCAR=0.0
Pod documented
19  
20 468 1;
21  
22 __END__
« Manager/Service/Echo.pm ↑ Summary Manager/Client/MariaDB.pm »