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
COPYRIGHT AND LICENSE
Copyright (C) 2020 Aran Clary Deltac
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.