ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Types-Serialiser/Serialiser.pm
(Generate patch)

Comparing Types-Serialiser/Serialiser.pm (file contents):
Revision 1.4 by root, Mon Oct 28 15:28:44 2013 UTC vs.
Revision 1.5 by root, Mon Oct 28 21:52:22 2013 UTC

184object instance. The serialiser is then supposed to encode the class name 184object instance. The serialiser is then supposed to encode the class name
185and all of these return values (which must be encodable in the format) 185and all of these return values (which must be encodable in the format)
186using the relevant form for perl objects. In CBOR for example, there is a 186using the relevant form for perl objects. In CBOR for example, there is a
187registered tag number for encoded perl objects. 187registered tag number for encoded perl objects.
188 188
189The values that C<FREEZE> returns must be serialisable with the serialiser
190that calls it. Therefore, it is recommended to use simple types such as
191strings and numbers, and maybe array references and hashes (basically, the
192JSON data model). You can always use a more complex format for a specific
193serialiser by checking the second argument.
194
189=head2 DECODING 195=head2 DECODING
190 196
191When the decoder then encounters such an encoded perl object, it should 197When the decoder then encounters such an encoded perl object, it should
192look up the C<THAW> method on the stored classname, and invoke it with the 198look up the C<THAW> method on the stored classname, and invoke it with the
193classname, the constant string to identify the format, and all the return 199classname, the constant string to identify the format, and all the return

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines