lib/Project/Easy/Config/Format/json.pm

filter: Statementstmt 100% 19 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 3 totaltotal 88.8% 24 / 27 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
new
1.0
CRAP 1.0
« blib/lib/Project/Easy/Config/Format/perl.pm ↑ Summary
1 package Project::Easy::Config::Format::json;
2  
3 10 ▶use Class::Easy;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 10 ▶use JSON;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 43 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
8 43 my $class = shift;
9
10 43 my $json = JSON->new;
11 43 $json->utf8 (1);
12 43 $json->pretty (1);
13 43 $json->convert_blessed (1);
14
15 43 bless {worker => $json}, $class;
16 }
17  
18 31 ▶sub parse_string {
Subroutine parse_string: called CC=1 SCAR=0.0
Pod undocumented
19 31 my $self = shift;
20 31 my $string = shift;
21  
22 31 return $self->{worker}->decode ($string);
23 }
24  
25 9 ▶sub dump_struct {
Subroutine dump_struct: called CC=1 SCAR=0.0
Pod undocumented
26 9 my $self = shift;
27 9 my $string = shift;
28  
29 9 return $self->{worker}->encode ($string);
30 }
31  
32  
33 10 1;
« blib/lib/Project/Easy/Config/Format/perl.pm ↑ Summary