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