Declare/ZDCF/Encoder/JSON.pm

filter: Statementstmt 100% 25 / 25 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 100% 2 / 2 totaltotal 100% 34 / 34 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Declare/ZDCF/Encoder/DumpEval.pm ↑ Summary Declare/ZDCF/Encoder/Storable.pm »
1 package ZMQ::Declare::ZDCF::Encoder::JSON;
2 {
3 1 $ZMQ::Declare::ZDCF::Encoder::JSON::VERSION = '0.03';
4 }
5 1 ▶use 5.008001;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 ▶use parent 'ZMQ::Declare::ZDCF::Encoder';
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 ▶use JSON ();
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 1 my $json = JSON->new;
13 1 $json->utf8(1);
14 1 $json->pretty(1);
15  
16 3 ▶sub encode {
Subroutine encode: called CC=1 SCAR=0.0
Pod documented
17 3 my $self = shift;
18 3 return \($json->encode(shift));
19 }
20  
21 3 ▶sub decode {
Subroutine decode: called CC=1 SCAR=0.0
Pod documented
22 3 my $self = shift;
23 3 return $json->decode(${shift()});
24 }
25  
26 1 ▶no Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
27 1 __PACKAGE__->meta->make_immutable;
28  
29 __END__
« Declare/ZDCF/Encoder/DumpEval.pm ↑ Summary Declare/ZDCF/Encoder/Storable.pm »