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.1'; |
5
|
5
|
|
|
5
|
|
4521
|
use strict; |
|
5
|
|
|
|
|
15
|
|
|
5
|
|
|
|
|
167
|
|
6
|
5
|
|
|
5
|
|
29
|
use warnings; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
138
|
|
7
|
|
|
|
|
|
|
|
8
|
5
|
|
|
5
|
|
28
|
use Moo; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
29
|
|
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__ |