KiokuDB::Backend::Serialize(3pm)

KiokuDB::Backend::Serialize3pm

Serialization role for backends

Usage

    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);
    }

Version

version 0.57

Overview

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.

Required methods

serializate $entry

Takes a KiokuDB::Entry as an argument. Should return a value suitable for storage by the backend.

deserialize $blob

Takes whatever "serializate" returned and should inflate and return a KiokuDB::Entry.

Releases

6 releases since Debian 7 (Wheezy); the text changed 2 times.

  1. 7
  2. 8–10
  3. 12–13

Author

Yuval Kogman <[email protected]>

From libkiokudb-perl 0.57-3 in Debian 13 (Trixie). Parsed by carta from the page's man source.