Config::Onion::Simple - Simple interface to a Config::Onion singleton
version 1.001
use Config::Onion::Simple qw( cfg cfg_obj ); cfg_obj->load('myapp'); my $setting = cfg->{setting};
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.
Config::Onion::Simple exports nothing by default. The following functions are exported only on request.
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
cfg_obj->get
Returns a reference to the Config::Onion singleton. Use this object's methods to make any changes to the configuration.
Config::Onion
Dave Sherohman <dsheroh@cpan.org>
This software is copyright (c) 2013 by Lund University Library.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Config::Onion, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Config::Onion
CPAN shell
perl -MCPAN -e shell install Config::Onion
For more information on module installation, please visit the detailed CPAN module installation guide.