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) 2002-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
|
23
|
|
|
23
|
|
127
|
use base Event::RPC::Message; |
|
23
|
|
|
|
|
32
|
|
|
23
|
|
|
|
|
2817
|
|
14
|
|
|
|
|
|
|
|
15
|
23
|
|
|
23
|
|
154
|
use strict; |
|
23
|
|
|
|
|
62
|
|
|
23
|
|
|
|
|
605
|
|
16
|
23
|
|
|
23
|
|
108
|
use utf8; |
|
23
|
|
|
|
|
46
|
|
|
23
|
|
|
|
|
204
|
|
17
|
|
|
|
|
|
|
|
18
|
23
|
|
|
|
|
3724
|
use Sereal qw(sereal_encode_with_object |
19
|
23
|
|
|
23
|
|
15444
|
sereal_decode_with_object); |
|
23
|
|
|
|
|
12965
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
my $decoder = Sereal::Decoder->new; |
22
|
|
|
|
|
|
|
my $encoder = Sereal::Encoder->new; |
23
|
|
|
|
|
|
|
|
24
|
267
|
|
|
267
|
0
|
4610
|
sub decode_message { sereal_decode_with_object($decoder, $_[1]) } |
25
|
268
|
|
|
268
|
0
|
9267
|
sub encode_message { sereal_encode_with_object($encoder, $_[1]) } |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__END__ |