Config::Onion::Simple(3pm)

Config::Onion::Simple3pm

Simple interface to a config::onion singleton

Usage

  use Config::Onion::Simple qw( cfg cfg_obj );
  cfg_obj->load('myapp');
  my $setting = cfg->{setting};

Version

version 1.007

Overview

It is often useful for a single master configuration to be shared across multiple modules in an application. Config::Onion::Simple provides an interface to do this without requiring any of those modules to know about each other.

Exportable functions

Config::Onion::Simple exports nothing by default. The following functions are exported only on request.

cfg

Returns a reference to the complete configuration hash managed by the Config::Onion singleton. This hash should be treated as read-only, as any changes will be lost if the configuration is altered using the underlying Config::Onion instance's methods.

Calling "cfg" is equivalent to calling "cfg_obj->get".

cfg_obj

Returns a reference to the Config::Onion singleton. Use this object's methods to make any changes to the configuration.

Releases

6 releases since Debian 8 (Jessie); the text changed 4 times.

  1. 8
  2. 9–10
  3. 11
  4. 12
  5. 13

Author

Dave Sherohman <[email protected]>

From libconfig-onion-perl 1.007-3 in Debian 13 (Trixie). Parsed by carta from the page's man source.