The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Object::Depot::Role - Expose Object::Depot as a global 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_depot" has not yet been called.

CLASS METHODS

init_depot

    __PACKAGE__->init_depot( $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

SUPPORT

See "SUPPORT" in Object::Depot.

AUTHORS

See "AUTHORS" in Object::Depot.

LICENSE

See "LICENSE" in Object::Depot.