NAME

Data::Object::Registry

ABSTRACT

Data-Object Namespace Registry

SYNOPSIS

use Data::Object::Registry;

my $registry = Data::Object::Registry->new;

DESCRIPTION

Data::Object::Registry is a singleton that holds mappings for namespaces and type libraries.

METHODS

This package implements the following methods.

def

def() : Str

Returns the default type library.

def example
my $def = $registry->def();

get

get(Str $arg1) : Any

The get method returns the value of the element with the specific key.

get example
my $get = $registry->get($key);

lut

lut(Str $arg1) : ArrayRef

Returns the lookup table for a given namespace.

lut example
my $lut = $registry->lut($key);

obj

obj(ClassName $arg1) : InstanceOf[Type::Registry]

Return the Type::Registry object for a given namespace.

obj example
my $obj = $registry->obj($key);

rem

rem(Str $arg1, Str $arg2) : Str

Remove the registered type library from a given namespace.

rem example
my $rem = $registry->rem($key, $val);

set

set(Str $arg1, Any $arg2) : Any

Set the supplied key and value, and return the value.

set example
my $set = $registry->set($key, $val);

tns

tns() : HashRef

Returns the registered type-namespaces.

tns example
my $tns = $registry->tns();