NAME

Object::Depot::Singleton - Expose an Object::Depot as a singleton.

SYNOPSIS

See "SYNOPSIS" in Object::Depot.

DESCRIPTION

This role rolls up an Object::Depot into a singleton available to all code in your application. This role is ideal for creating global, simplified, and centralized access to shared resources such as connections to internal and cloud services.

CLASS ATTRIBUTES

depot

The Object::Depot singleton object. Will return undef if "init" has not yet been called.

CLASS METHODS

init

__PACKAGE__->init( $depot );

Takes an Object::Depot object and saves it for later retrieval by "depot".

PROXIED METHODS

These class methods proxy to the "depot" object.

"fetch" in Object::Depot
"store" in Object::Depot
"remove" in Object::Depot
"create" in Object::Depot
"arguments" in Object::Depot
"declared_keys" in Object::Depot
"inject" in Object::Depot
"inject_with_guard" in Object::Depot
"clear_injection" in Object::Depot
"injection" in Object::Depot
"has_injection" in Object::Depot
"add_key" in Object::Depot
"alias_key" in Object::Depot