The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Data::AMF::XS - serialize / deserialize AMF data

SYNOPSIS

    use Data::AMF::XS;
    
    my $amf0_data    = encode_amf0(@perl_objects);
    my @perl_objects = decode_amf0($amf0_data);

DESCRIPTION

This module provides simple and fast serialize/deserialize functions for AMF data.

ALPHA LIMITATION

This module is *ALPHA* release and has several limitations at this time.

  • Support only AMF0 (and limited type)

  • No AMF RPC Packet support (only AMF data)

EXPORTED FUNCTIONS

encode_amf0($obj, ...)

   my $amf0_data = encode_amf0(@objs);

Serialize perl objects to AMF data.

decode_amf0($amf0_data)

   my @objs = decode_amf0($amf0_data);

Deserialize AMF data to perl objects.

NOTICE: this function may return list value when $amf0_data contains multiple objects. So you should treat return value as list. If you need only first objects, you should do:

    my ($obj) = decode_amf0($amf0_data);

should not do:

    my $obj = decode_amf0($amf0_data); # WRONG

AUTHOR

Daisuke Murase <typester@cpan.org>

COPYRIGHT AND LICENSE

Copyright (c) 2010 by KAYAC Inc.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.