Анатолий Гришаев

NAME

Storable::AMF0 - Perl extension for serialize/deserialize AMF0/AMF3 data

SYNOPSIS

  use Storable::AMF0 qw(freeze thaw); # or use Storable::AMF3 qw(freeze thaw) for AMF3 format

  $amf0 = freeze($perl_object);
  $perl_object = thaw($amf0);

        
  # Store/retrieve to disk amf0 data
        
  store $perl_object, 'file';
  $restored_perl_object = retrieve 'file';


  use Storable::AMF0 qw(nstore freeze thaw dclone);

  # Network order: Due to spec of AMF0 format objects (hash, arrayref) stored in network order.
  # and thus nstore and store are synonyms 

  nstore \%table, 'file';
  $hashref = retrieve('file'); 

  
  # Advisory locking
  use Storable::AMF0 qw(lock_store lock_nstore lock_retrieve)
  lock_store \%table, 'file';
  lock_nstore \%table, 'file';
  $hashref = lock_retrieve('file');

DESCRIPTION

This module is (de)serializer for Adobe's AMF0/AMF3 (Action Message Format ver 0-3). This is only module and it recognize only AMF0 data. Almost all function implemented in C for speed. And some cases faster then Storable( for me always)

EXPORT

  None by default.

FUNCTIONS

freeze($obj) --- Serialize perl object($obj) to AMF0, and return AMF0 data
thaw($amf0) --- Deserialize AMF0 data to perl object, and return the perl object
store $obj, $file --- Store serialized AMF0 data to file
nstore $obj, $file --- Same as store
retrieve $obj, $file --- Retrieve serialized AMF0 data from file
lock_store $obj, $file --- Same as store but with Advisory locking
lock_nstore $obj, $file --- Same as lock_store
lock_retrieve $file --- Same as retrieve but with advisory locking
dclone $file --- Deep cloning data structure
ref_destroy $obj --- Deep decloning data structure --- safely destroy cloned object or any object
ref_lost_memory $obj --- test if object contain lost memory fragments inside. (Example do { my $a = []; @$a=$a; $a})

NOTICE

  Storable::AMF0 is currently is alpha development stage. 

NOTICE

  Storable::AMF0 is currently at alpha development stage. 

LIMITATION

At current moment and with restriction of AMF0/AMF3 format referrences to scalar are not serialized, and can't/ may not serialize tied variables.

FEATURES

        Due bug of Macromedia 'XML' type not serialized properly (it loose all atributes for AMF0) 
        For AMF0 has to use XMLDocument type.

SEE ALSO

Data::AMF, Storable, Storable::AMF3

AUTHOR

Anatoliy Grishaev, <grian at cpan dot org>

COPYRIGHT AND LICENSE

Copyright (C) 2008 by A. G. Grishaev

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.