Created
August 17, 2011 03:44
-
-
Save cho45/1150774 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!perl | |
use strict; | |
use warnings; | |
use Data::MessagePack; | |
use Test::More; | |
my $data = { | |
'foo' => { | |
'a' => '', | |
'b' => '', | |
'c' => '', | |
'd' => '', | |
'e' => '', | |
'f' => '', | |
'g' => '', | |
} | |
}; | |
use Data::Dumper; | |
$Data::Dumper::Useqq = 1; | |
my $packed1 = +Data::MessagePack->pack($data); | |
my $packed2 = +Data::MessagePack->pack(Data::MessagePack->unpack($packed1)); | |
my $packed3 = +Data::MessagePack->pack(Data::MessagePack->unpack($packed2)); | |
my $packed4 = +Data::MessagePack->pack(Data::MessagePack->unpack($packed3)); | |
my $packed5 = +Data::MessagePack->pack(Data::MessagePack->unpack($packed4)); | |
is $packed1, $packed2; | |
is $packed1, $packed3; | |
is $packed1, $packed4; | |
is $packed1, $packed5; | |
done_testing; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment