| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# ABSTRACT: Bubblegum Wrapper around YAML Serialization |
|
2
|
|
|
|
|
|
|
package Bubblegum::Wrapper::Yaml; |
|
3
|
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
520
|
use 5.10.0; |
|
|
1
|
|
|
|
|
4
|
|
|
|
1
|
|
|
|
|
52
|
|
|
5
|
1
|
|
|
1
|
|
1203
|
use namespace::autoclean; |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
use Bubblegum::Class; |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
use Class::Load 'load_class'; |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
extends 'Bubblegum::Object::Instance'; |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our $VERSION = '0.44'; # VERSION |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub decode { |
|
15
|
|
|
|
|
|
|
my $self = shift; |
|
16
|
|
|
|
|
|
|
my $yaml = load_class('YAML::Tiny', {-version => 1.56})->new; |
|
17
|
|
|
|
|
|
|
return $yaml->read_string($self->data); |
|
18
|
|
|
|
|
|
|
} |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub encode { |
|
21
|
|
|
|
|
|
|
my $self = shift; |
|
22
|
|
|
|
|
|
|
my $yaml = load_class('YAML::Tiny', {-version => 1.56})->new; |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
$yaml->[0] = $self->data; # hack |
|
25
|
|
|
|
|
|
|
return $yaml->write_string($self->data); |
|
26
|
|
|
|
|
|
|
} |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
__END__ |