KiokuDB::TypeMap(3pm)

KiokuDB::TypeMap3pm

Class to collapsing/expanding logic.

Usage

    use KiokuDB::TypeMap;
    KiokuDB::TypeMap->new(
        entries => {
            'Foo' => KiokuDB::TypeMap::Entry::Naive->new,
        },
        isa_entries => {
            'My::Class' => KiokuDB::TypeMap::Entry::Naive->new,
        },
        includes => [
            $typemap_foo,
            $typemap_bar,
        ],
    );

Version

version 0.57

Overview

The KiokuDB typemap maps classes to KiokuDB::TypeMap::Entry objects.

The mapping is by class, and entries can be keyed normally (using "ref $object" equality) or by filtering on "$object->isa($class)" ("isa_entries").

Attributes

entries

A hash of normal entries.

isa_entries

A hash of "$object->isa" based entries.

includes

A list of parent typemaps to inherit entries from.

Methods

resolve $class

Given a class returns the "KiokuDB::TypeMap::Entry" object corresponding to that class.

Called by KiokuDB::TypeMap::Resolver

resolve_entry $entry

If the entry is an alias, it will be resolved recursively, and simply returned otherwise.

all_entries

Returns the merged "entries" from this typemap and all the included typemaps.

all_isa_entries

Returns the merged "isa_entries" from this typemap and all the included typemaps.

all_isa_entry_classes

An array reference of all the classes in "all_isa_entries", sorted from least derived to most derived.

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.