blib/lib/MLDBM/Serializer/YAML.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 12 | 12 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 4 | 4 | 100.0 |
pod | 0 | 2 | 0.0 |
total | 16 | 18 | 88.8 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package MLDBM::Serializer::YAML; | ||||||
2 | $VERSION = '0.10'; | ||||||
3 | @ISA = qw(MLDBM::Serializer); | ||||||
4 | |||||||
5 | 1 | 1 | 834 | use strict; | |||
1 | 2 | ||||||
1 | 46 | ||||||
6 | 1 | 1 | 876 | use YAML '0.35'; | |||
1 | 8130 | ||||||
1 | 253 | ||||||
7 | |||||||
8 | sub serialize { | ||||||
9 | 1 | 1 | 0 | 67 | local $YAML::UseVersion = 0; | ||
10 | 1 | 1 | local $YAML::CompressSeries = 0; | ||||
11 | 1 | 3 | local $YAML::Indent = 1; | ||||
12 | 1 | 3 | local $YAML::SortKeys = 0; | ||||
13 | 1 | 5 | YAML::Dump($_[1]); | ||||
14 | } | ||||||
15 | |||||||
16 | sub deserialize { | ||||||
17 | 1 | 1 | 0 | 23091 | YAML::Load($_[1]); | ||
18 | } | ||||||
19 | |||||||
20 | 1; |