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