Data::AMF::XS - serialize / deserialize AMF data
use Data::AMF::XS; my $amf0_data = encode_amf0(@perl_objects); my @perl_objects = decode_amf0($amf0_data);
This module provides simple and fast serialize/deserialize functions for AMF data.
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)
my $amf0_data = encode_amf0(@objs);
Serialize perl objects to AMF 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:
$amf0_data
my ($obj) = decode_amf0($amf0_data);
should not do:
my $obj = decode_amf0($amf0_data); # WRONG
Daisuke Murase <typester@cpan.org>
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.
To install Data::AMF::XS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::AMF::XS
CPAN shell
perl -MCPAN -e shell install Data::AMF::XS
For more information on module installation, please visit the detailed CPAN module installation guide.