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.4.0'; |
5
|
6
|
|
|
6
|
|
12985
|
use strict; |
|
6
|
|
|
|
|
15
|
|
|
6
|
|
|
|
|
174
|
|
6
|
6
|
|
|
6
|
|
30
|
use warnings; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
182
|
|
7
|
|
|
|
|
|
|
|
8
|
6
|
|
|
6
|
|
40
|
use Module::Runtime qw/ use_module /; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
44
|
|
9
|
|
|
|
|
|
|
|
10
|
6
|
|
|
6
|
|
2452
|
use Moo; |
|
6
|
|
|
|
|
33288
|
|
|
6
|
|
|
|
|
43
|
|
11
|
|
|
|
|
|
|
extends 'File::Serialize::Serializer::JSON::MaybeXS'; |
12
|
|
|
|
|
|
|
|
13
|
57
|
|
|
57
|
1
|
175
|
sub extensions { qw/ json5 / }; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub required_modules { |
16
|
115
|
|
|
115
|
0
|
518
|
qw/ JSON5 JSON::MaybeXS / |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub deserialize { |
20
|
2
|
|
|
2
|
0
|
333
|
my( $self, $data, $options ) = @_; |
21
|
2
|
|
|
|
|
9
|
use_module('JSON5'); |
22
|
2
|
|
|
|
|
15984
|
return JSON5::decode_json5($data,$options); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
__END__ |