line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catmandu::Serializer::messagepack; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
49145
|
use Catmandu::Sane; |
|
1
|
|
|
|
|
185053
|
|
|
1
|
|
|
|
|
7
|
|
4
|
1
|
|
|
1
|
|
2175
|
use Data::MessagePack; |
|
1
|
|
|
|
|
2529
|
|
|
1
|
|
|
|
|
30
|
|
5
|
1
|
|
|
1
|
|
1514
|
use MIME::Base64 (); |
|
1
|
|
|
|
|
1437
|
|
|
1
|
|
|
|
|
25
|
|
6
|
1
|
|
|
1
|
|
8
|
use Moo; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 NAME |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Catmandu::Serializer::messagepack - A Catmandu::Serializer backend using Data::MessagePack |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 VERSION |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
Version 0.0101 |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=cut |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
our $VERSION = '0.0101'; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
has mp => ( |
21
|
|
|
|
|
|
|
is => 'ro', |
22
|
|
|
|
|
|
|
default => sub { Data::MessagePack->new->utf8 }, |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub serialize { |
26
|
0
|
|
|
0
|
0
|
|
MIME::Base64::encode($_[0]->mp->pack($_[1])); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub deserialize { |
30
|
0
|
|
|
0
|
0
|
|
$_[0]->mp->unpack(MIME::Base64::decode($_[1])); |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
|