line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package APISchema::Validator::Decoder; |
2
|
3
|
|
|
3
|
|
20
|
use strict; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
85
|
|
3
|
3
|
|
|
3
|
|
17
|
use warnings; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
97
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
# cpan |
6
|
3
|
|
|
3
|
|
18
|
use JSON::XS qw(decode_json); |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
153
|
|
7
|
3
|
|
|
3
|
|
1319
|
use URL::Encode qw(url_params_mixed); |
|
3
|
|
|
|
|
14924
|
|
|
3
|
|
|
|
|
206
|
|
8
|
3
|
|
|
3
|
|
22
|
use Class::Accessor::Lite ( new => 1 ); |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
25
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub perl { |
11
|
15
|
|
|
15
|
0
|
125
|
my ($self, $body) = @_; |
12
|
15
|
|
|
|
|
40
|
return $body; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
my $JSON = JSON::XS->new->utf8; |
16
|
|
|
|
|
|
|
sub json { |
17
|
29
|
|
|
29
|
0
|
216
|
my ($self, $body) = @_; |
18
|
29
|
|
|
|
|
327
|
return $JSON->decode($body); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub url_parameter { |
22
|
13
|
|
|
13
|
0
|
114
|
my ($self, $body) = @_; |
23
|
13
|
100
|
|
|
|
53
|
return undef unless defined $body; |
24
|
12
|
|
|
|
|
56
|
return url_params_mixed($body, 1); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |