--- AnyEvent-Fork-RPC/RPC.pm 2013/04/28 14:34:40 1.27 +++ AnyEvent-Fork-RPC/RPC.pm 2013/04/28 15:48:31 1.28 @@ -457,6 +457,21 @@ sub { @{ Storable::thaw shift } } ) +=item portable storable - C<$AnyEvent::Fork::RPC::NSTORABLE_SERIALISER> + +This serialiser also uses L, but uses it's "network" format +to serialise data, which makes it possible to talk to incompatible +perl versions (for example, when talking to a process created with +L). + +Implementation: + + use Storable (); + ( + sub { Storable::nfreeze \@_ }, + sub { @{ Storable::thaw shift } } + ) + =back =back @@ -466,9 +481,10 @@ =cut -our $STRING_SERIALISER = '(sub { pack "(w/a*)*", @_ }, sub { unpack "(w/a*)*", shift })'; -our $JSON_SERIALISER = 'use JSON (); (sub { JSON::encode_json \@_ }, sub { @{ JSON::decode_json shift } })'; -our $STORABLE_SERIALISER = 'use Storable (); (sub { Storable::freeze \@_ }, sub { @{ Storable::thaw shift } })'; +our $STRING_SERIALISER = '(sub { pack "(w/a*)*", @_ }, sub { unpack "(w/a*)*", shift })'; +our $JSON_SERIALISER = 'use JSON (); (sub { JSON::encode_json \@_ }, sub { @{ JSON::decode_json shift } })'; +our $STORABLE_SERIALISER = 'use Storable (); (sub { Storable::freeze \@_ }, sub { @{ Storable::thaw shift } })'; +our $NSTORABLE_SERIALISER = 'use Storable (); (sub { Storable::nfreeze \@_ }, sub { @{ Storable::thaw shift } })'; sub run { my ($self, $function, %arg) = @_;