line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
6
|
|
|
6
|
|
52444
|
use strict; |
|
6
|
|
|
|
|
15
|
|
|
6
|
|
|
|
|
241
|
|
2
|
6
|
|
|
6
|
|
33
|
use warnings; |
|
6
|
|
|
|
|
14
|
|
|
6
|
|
|
|
|
360
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package MetaPOD::Format::JSON::Decoder::v1; |
5
|
|
|
|
|
|
|
BEGIN { |
6
|
6
|
|
|
6
|
|
208
|
$MetaPOD::Format::JSON::Decoder::v1::AUTHORITY = 'cpan:KENTNL'; |
7
|
|
|
|
|
|
|
} |
8
|
|
|
|
|
|
|
{ |
9
|
|
|
|
|
|
|
$MetaPOD::Format::JSON::Decoder::v1::VERSION = '0.3.0'; |
10
|
|
|
|
|
|
|
} |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
# ABSTRACT: C to Structure translation layer |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
6
|
|
|
6
|
|
905
|
use Moo::Role; |
|
6
|
|
|
|
|
31138
|
|
|
6
|
|
|
|
|
53
|
|
16
|
6
|
|
|
6
|
|
7116
|
use Try::Tiny qw( try catch ); |
|
6
|
|
|
|
|
8293
|
|
|
6
|
|
|
|
|
1347
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub decode { |
20
|
13
|
|
|
13
|
1
|
46
|
my ( $self, $data ) = @_; |
21
|
13
|
|
|
|
|
117
|
require JSON; |
22
|
13
|
|
|
|
|
25
|
my $return; |
23
|
|
|
|
|
|
|
try { |
24
|
13
|
|
|
13
|
|
824
|
$return = JSON->new->decode($data); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
catch { |
27
|
0
|
|
|
0
|
|
0
|
require MetaPOD::Exception::Decode::Data; |
28
|
0
|
|
|
|
|
0
|
MetaPOD::Exception::Decode::Data->throw( |
29
|
|
|
|
|
|
|
{ |
30
|
|
|
|
|
|
|
internal_message => $_, |
31
|
|
|
|
|
|
|
data => $data, |
32
|
|
|
|
|
|
|
previous_exception => $_, |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
); |
35
|
13
|
|
|
|
|
237
|
}; |
36
|
13
|
|
|
|
|
295
|
return $return; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
__END__ |