GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  DR::TARANTOOL::MSGPACK (3)

.ds Aq ’

NAME

DR::Tarantool::MsgPack - msgpack encoder/decoder.

CONTENTS

SYNOPSIS



    use DR::Tarantool::MsgPack msgpack, msgunpack, msgcheck;

    # encode object
    my $pkt = msgpack({ a => b });

    # decode object
    my $object = msgunpack($pkt);

    # decode object with utf8-strings
    my $object = msgunpack($pkt, 1);

    # check if $string is valid msgpack
    $object = msgunpack($str, 1) if msgcheck($str);



METHODS

    msgpack($OBJECT)

Encode perl object (scalar, hash, array) to octets.

msgunpack($OCTETS[, CW$UTF8])

Decide octets to perl object. Return perl object and tail of input string.

If $UTF8 is true, msgunpack will decode utf8-strings.

    true and false

Protocol supports true and false statements. msgunpack unpacks them to 1 and 0.

If You want to pack true You can use <B>DR::Tarantool::MsgPack::BoolB>:



    use DR::Tarantool::MsgPack msgpack;

    my $to_pack = { a => DR::Tarantool::MsgPack::Bool->new(0) };
    my $pkt = msgpack($to_pack);



Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 DR::TARANTOOL::MSGPACK (3) 2014-06-16

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.