Mvalve::Message - A Message Object


Mvalve documentation  | view source Contained in the Mvalve distribution.

Index


NAME

Top

Mvalve::Message - A Message Object

SYNOPSIS

Top

  use Mvalve::Message;

  my $message = Mvalve::Message->new(
    headers => {
      from => 'me',
      to   => 'you',
    },
    content => {
      random => 'content',
    }
  );

  my $serialized   = $message->serialize;
  my $materialized = Mvalve::Message->deserialize($serialized);

METHODS

Top

BUILD

Custom BUILD() for Moose

SERIALIZER

Returns the serializer object to use

serialize

Serializes the message

deserialize

Deserializes a packed structure to a message


Mvalve documentation  | view source Contained in the Mvalve distribution.