line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package File::Serialize::Serializer::TOML; |
2
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:YANICK'; |
3
|
|
|
|
|
|
|
#ABSTRACT: TOML serializer for File::Serialize |
4
|
|
|
|
|
|
|
$File::Serialize::Serializer::TOML::VERSION = '1.5.0'; |
5
|
6
|
|
|
6
|
|
4939
|
use strict; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
173
|
|
6
|
6
|
|
|
6
|
|
30
|
use warnings; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
163
|
|
7
|
|
|
|
|
|
|
|
8
|
6
|
|
|
6
|
|
28
|
use Moo; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
34
|
|
9
|
|
|
|
|
|
|
with 'File::Serialize::Serializer'; |
10
|
|
|
|
|
|
|
|
11
|
0
|
|
|
0
|
1
|
|
sub extensions { qw/ toml / }; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub serialize { |
14
|
|
|
|
|
|
|
my( $self, $data, $options ) = @_; |
15
|
|
|
|
|
|
|
TOML::to_toml( $data ); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub deserialize { |
20
|
|
|
|
|
|
|
my( $self, $data, $options ) = @_; |
21
|
|
|
|
|
|
|
TOML::from_toml( $data ); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
__END__ |