Add binmode() for stream unpacking

This commit is contained in:
gfx 2010-09-16 20:27:25 +09:00
parent afbddbfcda
commit 7c1e0ea95d

View file

@ -30,6 +30,7 @@ is_deeply(Data::MessagePack->unpack($packed), $input);
note "packed size: ", length($packed);
open my $stream, '<:bytes :scalar', \$packed;
binmode $stream;
my $buff;
while( read($stream, $buff, $size) ) {
note "buff: ", join " ", map { unpack 'H2', $_ } split //, $buff;