NAME
Data::MessagePack::Unpacker - messagepack streaming deserializer
SYNOPSIS
use Data::Dumper;
my $up = Data::MessagePack::Unpacker->new;
my $ret = $up->execute($v, 0);
if ($ret != length($v)) {
fail "extra bytes";
}
return Dumper($up->data);
DESCRIPTION
This is a streaming deserializer for messagepack.
METHODS
- my $up = Data::MessagePack::Unpacker->new()
-
creates a new instance of stream deserializer.
- my $ret = $up->execute($data, $offset);
- my $ret = $up->execute_limit($data, $offset, $limit)
-
$up->execute(substr($data, 0, 3), 0); $up->execute($data, 3);
$offset is the offset of $data.
- my $bool = $up->is_finished();
-
is this deserializer finished?
- my $data = $up->data();
-
returns the deserialized object.
- $up->reset();
-
resets the stream deserializer, without memory zone.
AUTHORS
Tokuhiro Matsuno