Help language development. Donate to The Perl Foundation
Perl 6 Interface to libmsgpack
use v6; use MsgPack; my $data = [1, True, "Example", { "that" => "rocks" }]; my $packed = MsgPack::pack($data); my $unpacked = MsgPack::unpack($packed); say "data : " ~ $data.perl; say "packed : " ~ $packed.perl; say "unpacked : " ~ $unpacked.perl;
For more examples, please see the examples folder.
Please follow the section below to install libmsgpack
on your system.
Install it using zef (a module management tool bundled with Rakudo Star):
$ zef install MsgPack
Please follow the instructions below based on your platform:
msgpack
development headers / libraries, please run:$ sudo apt-get install libmsgpack-dev
msgpack
development headers / libraries, please run:$ brew update $ brew install msgpack
Not supported at the moment but planned as a pre-built DLL in the near future.
TODO support windows with a pre-built DLL
$ prove -ve "perl6 -Ilib"
$ zef install Test::META $ AUTHOR_TESTING=1 prove -e "perl6 -Ilib"
Most of the excellent tests here are based of the work of Pierre Vigier. Thanks for creating an excellent pure Perl 6 reference implementation.
Ahmad M. Zawawi, azawawi on #perl6
MIT License