From 7c1e0ea95d1aed954ee97bc3a72c7779e085f9ec Mon Sep 17 00:00:00 2001 From: gfx Date: Thu, 16 Sep 2010 20:27:25 +0900 Subject: [PATCH] Add binmode() for stream unpacking --- perl/t/06_stream_unpack2.t | 1 + 1 file changed, 1 insertion(+) diff --git a/perl/t/06_stream_unpack2.t b/perl/t/06_stream_unpack2.t index 68a2873..78ca8f7 100644 --- a/perl/t/06_stream_unpack2.t +++ b/perl/t/06_stream_unpack2.t @@ -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;