line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Id: Message.pm,v 1.9 2014-01-28 15:40:10 joern Exp $ |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
#----------------------------------------------------------------------- |
4
|
|
|
|
|
|
|
# Copyright (C) 2005-2015 by Jörn Reder . |
5
|
|
|
|
|
|
|
# All Rights Reserved. See file COPYRIGHT for details. |
6
|
|
|
|
|
|
|
# |
7
|
|
|
|
|
|
|
# This module is part of Event::RPC, which is free software; you can |
8
|
|
|
|
|
|
|
# redistribute it and/or modify it under the same terms as Perl itself. |
9
|
|
|
|
|
|
|
#----------------------------------------------------------------------- |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
package Event::RPC::Message::Sereal; |
12
|
|
|
|
|
|
|
|
13
|
29
|
|
|
29
|
|
190
|
use base Event::RPC::Message; |
|
29
|
|
|
|
|
49
|
|
|
29
|
|
|
|
|
4311
|
|
14
|
|
|
|
|
|
|
|
15
|
29
|
|
|
29
|
|
185
|
use strict; |
|
29
|
|
|
|
|
56
|
|
|
29
|
|
|
|
|
613
|
|
16
|
29
|
|
|
29
|
|
138
|
use utf8; |
|
29
|
|
|
|
|
45
|
|
|
29
|
|
|
|
|
326
|
|
17
|
|
|
|
|
|
|
|
18
|
29
|
|
|
|
|
3941
|
use Sereal qw(sereal_encode_with_object |
19
|
29
|
|
|
29
|
|
11615
|
sereal_decode_with_object); |
|
29
|
|
|
|
|
24464
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
my $decoder = Sereal::Decoder->new; |
22
|
|
|
|
|
|
|
my $encoder = Sereal::Encoder->new; |
23
|
|
|
|
|
|
|
|
24
|
297
|
|
|
297
|
0
|
4564
|
sub decode_message { sereal_decode_with_object($decoder, $_[1]) } |
25
|
298
|
|
|
298
|
0
|
6519
|
sub encode_message { sereal_encode_with_object($encoder, $_[1]) } |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__END__ |