William Travis Holton > POE-Filter-Hessian > POE::Filter::Hessian

Download:
POE-Filter-Hessian-1.00.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 1.00   Source  

NAME ^

POE::Filter::Hessian - Translate datastructures to and from Hessian for transmission via a POE ReadWrite wheel.

SYNOPSIS ^

   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();

DESCRIPTION ^

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.

INTERFACE ^

clone

get_one_start

Accepts a list of Hessian serialized strings. The list of strings is added to the internal buffer.

get_one

If possible, parse one element from the buffer. Returns a single deserialized datastructure or undef if the buffer contains an incomplete message.

get

Greedily process as much of the buffer as possible.

put

Accepts a list of items to be serialized. The result is an array reference containing a list of Hessian strings representing the serialized datastructures.

get_pending

syntax highlighting: