Argon

 view release on metacpan or  search on metacpan

lib/Argon/Marshal.pm  view on Meta::CPAN

=head1 VERSION

version 0.18

=head1 SYNOPSIS

  use Argon::Marshal;

  my $data = ['fnord'];
  my $encoded = encode($data);
  my $decoded = decode($encoded);

  my $msg = Argon::Message->new(...);
  my $encoded = encode_msg($msg);
  my $decoded = decode_msg($encoded);

=head1 DESCRIPTION

Provides routines to serialize and deserialize data and L<Argon::Message>s.

=head1 AUTHOR

Jeff Ober <sysread@fastmail.fm>

=head1 COPYRIGHT AND LICENSE

lib/Argon/Message.pm  view on Meta::CPAN

Returns a copy of the message. Any additional parameters passed are passed
transparently to C<new>.

=head2 error

Returns a new message with the same id, C<cmd> set to C<$ERROR>, and C<info>
set to the supplied error message.

=head2 result

Returns the decoded data playload. If the message is an C<$ERROR> or C<$DENY>,
croaks with C<info> as the error message. If the message is an C<$ACK>, returns
true.

=head2 explain

Returns a formatted string describing the message. Useful for debugging and
logging.

=head1 AUTHOR



( run in 0.369 second using v1.01-cache-2.11-cpan-26ccb49234f )