line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package File::Serialize::Serializer::JSON5; |
2
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:YANICK'; |
3
|
|
|
|
|
|
|
#ABSTRACT: JSON5 serializer for File::Serialize |
4
|
|
|
|
|
|
|
$File::Serialize::Serializer::JSON5::VERSION = '1.5.0'; |
5
|
6
|
|
|
6
|
|
12001
|
use strict; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
171
|
|
6
|
6
|
|
|
6
|
|
27
|
use warnings; |
|
6
|
|
|
|
|
9
|
|
|
6
|
|
|
|
|
172
|
|
7
|
|
|
|
|
|
|
|
8
|
6
|
|
|
6
|
|
28
|
use Module::Runtime qw/ use_module /; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
42
|
|
9
|
|
|
|
|
|
|
|
10
|
6
|
|
|
6
|
|
2248
|
use Moo; |
|
6
|
|
|
|
|
29137
|
|
|
6
|
|
|
|
|
55
|
|
11
|
|
|
|
|
|
|
extends 'File::Serialize::Serializer::JSON::MaybeXS'; |
12
|
|
|
|
|
|
|
|
13
|
57
|
|
|
57
|
1
|
149
|
sub extensions { qw/ json5 / }; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub required_modules { |
16
|
115
|
|
|
115
|
0
|
368
|
qw/ JSON5 JSON::MaybeXS / |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub deserialize { |
20
|
2
|
|
|
2
|
0
|
489
|
my( $self, $data, $options ) = @_; |
21
|
2
|
|
|
|
|
12
|
use_module('JSON5'); |
22
|
2
|
|
|
|
|
17808
|
return JSON5::decode_json5($data,$options); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
__END__ |