| 1 | package RPC::Lite::Serializer::Null; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use base qw( RPC::Lite::Serializer ); | ||
| 5 | |||
| 6 | use RPC::Lite::Request; | ||
| 7 | use RPC::Lite::Response; | ||
| 8 | use RPC::Lite::Notification; | ||
| 9 | use RPC::Lite::Error; | ||
| 10 | |||
| 11 | our $VERSION = '0.1'; | ||
| 12 | |||
| 13 | our $DEBUG = $ENV{DEBUG_SERIALIZER}; | ||
| 14 | |||
| 15 | =pod | ||
| 16 | |||
| 17 | =head1 NAME | ||
| 18 | |||
| 19 | RPC::Lite::Serializer::Null -- The 'null' serializer. | ||
| 20 | |||
| 21 | =head1 SYNOPSIS | ||
| 22 | |||
| 23 | B<WARNING>: The null serializer will not currently work | ||
| 24 | with any of the suppoted transport layers. The null serializer | ||
| 25 | requires an "in-memory" transport layer between processes, | ||
| 26 | which is not currently available. This module is provided purely | ||
| 27 | as reference at this point. | ||
| 28 | |||
| 29 | =head1 DESCRIPTION | ||
| 30 | |||
| 31 | RPC::Lite::Serializer::Null is meant for clients and servers | ||
| 32 | operating on the I<same machine> that are both implemented in | ||
| 33 | I<perl>. It does not actually serialize the object. | ||
| 34 | |||
| 35 | =cut | ||
| 36 | |||
| 37 | sub VersionSupported | ||
| 38 | { | ||
| 39 | return 1; | ||
| 40 | } | ||
| 41 | |||
| 42 | sub GetVersion | ||
| 43 | { | ||
| 44 | return $VERSION; | ||
| 45 | } | ||
| 46 | |||
| 47 | sub Serialize | ||
| 48 | { | ||
| 49 | return $_[1]; | ||
| 50 | } | ||
| 51 | |||
| 52 | sub Deserialize | ||
| 53 | { | ||
| 54 | return $_[1]; | ||
| 55 | } | ||
| 56 | |||
| 57 | 1; |