POE::Filter::Hessian - Translate datastructures to and from Hessian for transmission via a POE ReadWrite wheel.
use POE::Filter::Hessian; my $filter = POE::Filter::Hessian->new( version => 2 ); my $hessian_elements = [ "M\x91\x05hello\x04word\x06Beetlez", "Ot\x00\x0bexample.Car\x92\x05color\x05model", "o\x90\x03RED\x06ferari" ]; my $processed_chunks = $filter->get($hessian_elements); my $map = $processed_chunks->[0]; # $map contains: # { 1 => 'hello', word => 'Beetle' }, my $object = $processed_chunks->[2]; my $color = $object->color(); my $model = $object->model();
The goal of POE::Filter::Hessian is to combine the versatility of POE with the Hessian serialization protocol.
As POE::Filter::Hessian is based on Hessian::Client which is still in a fairly experimental state, it can also be considered to be highly experimental.
Accepts a list of Hessian serialized strings. The list of strings is added to the internal buffer.
If possible, parse one element from the buffer. Returns a single deserialized datastructure or undef if the buffer contains an incomplete message.
undef
Greedily process as much of the buffer as possible.
Accepts a list of items to be serialized. The result is an array reference containing a list of Hessian strings representing the serialized datastructures.
To install POE::Filter::Hessian, copy and paste the appropriate command in to your terminal.
cpanm
cpanm POE::Filter::Hessian
CPAN shell
perl -MCPAN -e shell install POE::Filter::Hessian
For more information on module installation, please visit the detailed CPAN module installation guide.