07 Dec 2015 00:07:17 UTC
- Distribution: Sereal
- Module version: 3.014
- Source (raw)
- Browse (raw)
- How to Contribute
- Testers (1258 / 0 / 0)
- KwaliteeBus factor: 1
- 43.40% Coverage
- License: perl_5
- Perl: v5.8.0
- Activity24 month
- Download (187.68KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
- BUGS, CONTACT AND SUPPORT
- COPYRIGHT AND LICENSE
Sereal - Fast, compact, powerful binary (de-)serialization
use Sereal qw(encode_sereal decode_sereal sereal_encode_with_object sereal_decode_with_object looks_like_sereal); # Note: For performance reasons, you should prefer the OO interface, # or sereal_(en|de)code_with_object over the stateless # encode_sereal/decode_sereal functions. # See the Sereal::Performance documentation for details.
Sereal is an efficient, compact-output, binary and feature-rich serialization protocol. The Perl encoder is implemented as the Sereal::Encoder module, the Perl decoder correspondingly as Sereal::Decoder. They are distributed separately to allow for safe upgrading without downtime. (Hint: Upgrade the decoder everywhere first, then the encoder.)
Serealmodule is a very thin wrapper around both
Sereal::Decoder. It depends on both and loads both. So if you have a user of both encoder and decoder, it is enough to depend on a particular version of
Serealand you'll get the most recent released versions of
Sereal::Decoderwhose version is smaller than or equal to the version of
Serealyou depend on.
The protocol specification and many other bits of documentation can be found in the github repository. Right now, the specification is at https://github.com/Sereal/Sereal/blob/master/sereal_spec.pod, there is a discussion of the design objectives in https://github.com/Sereal/Sereal/blob/master/README.pod, and the output of our benchmarks can be seen at https://github.com/Sereal/Sereal/wiki/Sereal-Comparison-Graphs.
It is recommended to use the object-oriented interface of
Sereal::Decoderif you care about performance. For detailed performance considerations, see Sereal::Performance.
You can optionally import five functions from
encode_serealis the same function as Sereal::Encoder's
looks_like_serealare the same as Sereal::Decoder's functions of the same names. Finally, you can import the advanced functional interface
sereal_decode_with_object. Again, see Sereal::Performance for information about those.
After loading the
Sereal::Decoderare guaranteed to be loaded, so you can use their object-oriented interface.
For reporting bugs, please use the github bug tracker at http://github.com/Sereal/Sereal/issues.
For support and discussion of Sereal, there are two Google Groups:
Announcements around Sereal (extremely low volume): https://groups.google.com/forum/?fromgroups#!forum/sereal-announce
Sereal development list: https://groups.google.com/forum/?fromgroups#!forum/sereal-dev
Steffen Mueller <email@example.com>
This module was originally developed for Booking.com. With approval from Booking.com, this module was generalized and published on CPAN, for which the authors would like to express their gratitude.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Copyright (C) 2012, 2013, 2014 by Steffen Mueller