App::CELL::Config(3pm) | User Contributed Perl Documentation | App::CELL::Config(3pm) |
App::CELL::Config -- load, store, and dispense meta parameters, core parameters, and site parameters
use App::CELL::Config qw( $meta $core $site ); # get a parameter value (returns value or undef) my $value; $value = $meta->MY_PARAM; $value = $core->MY_PARAM; $value = $site->MY_PARAM; # set a meta parameter $meta->set( 'MY_PARAM', 42 ); # set an as-yet undefined core/site parameter $core->set( 'MY_PARAM', 42 ); $site->set( 'MY_PARAM', 42 );
The purpose of the App::CELL::Config module is to maintain and provide access to three package variables, $meta, $core, and $site, which are actually singleton objects, containing configuration parameters loaded by App::CELL::Load from files in the distro sharedir and the site configuration directory, if any.
For details, read App::CELL::Guilde.
This module exports three scalars: the 'singleton' objects $meta, $core, and $site.
The "AUTOLOAD" routine handles
calls that look like this:
$meta->MY_PARAM
$core->MY_PARAM
$site->MY_PARAM
For some reason, Perl 5.012 seems to want a DESTROY method
Determine parameter existence.
Wrapper for get_param
Get value of config param provided in the argument.
Routine to provide access not only to the value, but also to the metadata (file and line number where parameter was defined) associated with a given parameter.
Takes: parameter name. Returns: reference to the hash associated with the given parameter, or undef if no parameter found.
Use this function to set new params (meta/core/site) or change existing ones (meta only). Takes two arguments: parameter name and new value. Returns a status object.
2022-07-17 | perl v5.34.0 |