blib/lib/APISchema/Validator/Decoder.pm untested

filter: Statementstmt 0.0% 0 / 22 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 8 Podpod 0.0% 0 / 3 totaltotal 0.0% 0 / 33 CC 1 SCAR 6.9
CC
1
Cov
0%
perl
2.0
json
2.0
url_parameter
2.0
CRAP 2.0
1 package APISchema::Validator::Decoder;
2 use strict;
3 use warnings;
4  
5 # cpan
6 use JSON::XS qw(decode_json);
7 use URL::Encode qw(url_params_mixed);
8 use Class::Accessor::Lite ( new => 1 );
9  
10 sub perl {
11 my ($self, $body) = @_;
12 return $body;
13 }
14  
15 my $JSON = JSON::XS->new->utf8;
16 sub json {
17 my ($self, $body) = @_;
18 return $JSON->decode($body);
19 }
20  
21 sub url_parameter {
22 my ($self, $body) = @_;
23 return url_params_mixed($body, 1);
24 }
25  
26 1;