| 1 | package IPC::Manager::Serializer::JSON; | ||||||||||||||||||||
| 2 | 471 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 3 | 471 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | |||||||||||||||||||||
| 5 | 471 | our $VERSION = '0.000036'; | |||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | 471 | ▶ | use parent 'IPC::Manager::Serializer'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 8 | |||||||||||||||||||||
| 9 | 471 | ▶ | use Cpanel::JSON::XS; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 10 | |||||||||||||||||||||
| 11 | 471 | my $JSON; | |||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | sub _json { | ||||||||||||||||||||
| 14 | 3711 | ▶ | 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)
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)
| |||||||||||||||||||||
| 15 | } | ||||||||||||||||||||
| 16 | |||||||||||||||||||||
| 17 | 1992 | ▶ | sub serialize { _json()->encode($_[1]) } | ||||||||||||||||||
|
Subroutine
serialize: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 18 | 1719 | ▶ | sub deserialize { _json()->decode($_[1]) } | ||||||||||||||||||
|
Subroutine
deserialize: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 19 | |||||||||||||||||||||
| 20 | 471 | 1; | |||||||||||||||||||
| 21 | |||||||||||||||||||||
| 22 | __END__ | ||||||||||||||||||||