NAME

Data::Object::Registry

ABSTRACT

Data-Object Namespace Registry

SYNOPSIS

use Data::Object::Registry;

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

DESCRIPTION

This package is a singleton that holds mappings for namespaces and type libraries.

INHERITANCE

This package inherits behaviors from:

Data::Object::Base

LIBRARIES

This package uses type constraints defined by:

Data::Object::Library

METHODS

This package implements the following methods.

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

new

new() : Object

Construct a new object.

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

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

CREDITS

Al Newkirk, +296

Anthony Brummett, +10

José Joaquín Atria, +1

AUTHOR

Al Newkirk, awncorp@cpan.org

LICENSE

Copyright (C) 2011-2019, Al Newkirk, et al.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

PROJECT

GitHub

Projects

Milestones

Contributing

Issues

SEE ALSO

To get the most out of this distribution, consider reading the following:

Do

Data::Object

Data::Object::Class

Data::Object::ClassHas

Data::Object::Role

Data::Object::RoleHas

Data::Object::Library