Florian Ragwitz > KiokuDB-0.49 > KiokuDB::TypeMap::Entry

Download:
KiokuDB-0.49.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  3
Open  2
View/Report Bugs
Source   Latest Release: KiokuDB-0.57

NAME ^

KiokuDB::TypeMap::Entry - Role for KiokuDB::TypeMap entries

SYNOPSIS ^

    package KiokuDB::TypeMap::Foo;
    use Moose;

    with qw(KiokuDB::TypeMap::Entry);

    # or just use KiokuDB::TypeMap::Entry::Std

    sub compile {
        ...
    }

DESCRIPTION ^

This is the role consumed by all typemap entries.

REQUIRED METHODS ^

compile $class

This method is called by KiokuDB::TypeMap::Resolver for a given class, and should return two code references, one for collapsing and one for expanding.

The collapsing sub is called as a method on KiokuDB::Collapser and the expanding sub is called on KiokuDB::Linker.

The callbacks must call other KiokuDB::Collapser and KiokuDB::Linker methods to actually get the work done.

KiokuDB::TypeMap::Entry::Std provides a more concise way of defining typemap entries.

syntax highlighting: