line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package File::Serialize::Serializer::YAML::Tiny; |
2
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:YANICK'; |
3
|
|
|
|
|
|
|
#ABSTRACT: YAML::Tiny serializer for File::Serialize |
4
|
|
|
|
|
|
|
$File::Serialize::Serializer::YAML::Tiny::VERSION = '1.5.0'; |
5
|
6
|
|
|
6
|
|
4996
|
use strict; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
167
|
|
6
|
6
|
|
|
6
|
|
30
|
use warnings; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
137
|
|
7
|
|
|
|
|
|
|
|
8
|
6
|
|
|
6
|
|
41
|
use Moo; |
|
6
|
|
|
|
|
7
|
|
|
6
|
|
|
|
|
33
|
|
9
|
|
|
|
|
|
|
with 'File::Serialize::Serializer'; |
10
|
|
|
|
|
|
|
|
11
|
15
|
|
|
15
|
1
|
58
|
sub extensions { qw/ yml yaml / }; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub serialize { |
14
|
|
|
|
|
|
|
my( $self, $data, $options ) = @_; |
15
|
|
|
|
|
|
|
YAML::Tiny->new($data)->write_string |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub deserialize { |
20
|
|
|
|
|
|
|
my( $self, $data, $options ) = @_; |
21
|
|
|
|
|
|
|
YAML::Tiny->new->read_string($data)->[0]; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
__END__ |