KiokuDB::Backend::Serialize - Serialization role for backends
version 0.56
package KiokuDB::Backend::Serialize::Foo; use Moose::Role; use Foo; use namespace::clean -except => 'meta'; with qw(KiokuDB::Backend::Serialize); sub serialize { my ( $self, $entry ) = @_; Foo::serialize($entry) } sub deserialize { my ( $self, $blob ) = @_; Foo::deserialize($blob); }
This role provides provides a consistent way to use serialization modules to handle backend serialization.
See KiokuDB::Backend::Serialize::Storable, KiokuDB::Backend::Serialize::YAML and KiokuDB::Backend::Serialize::JSON for examples.
Takes a KiokuDB::Entry as an argument. Should return a value suitable for storage by the backend.
Takes whatever serializate returned and should inflate and return a KiokuDB::Entry.
serializate
Yuval Kogman <nothingmuch@woobling.org>
This software is copyright (c) 2013 by Yuval Kogman, Infinity Interactive.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install KiokuDB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm KiokuDB
CPAN shell
perl -MCPAN -e shell install KiokuDB
For more information on module installation, please visit the detailed CPAN module installation guide.