App::CELL::Config(3pm)

App::CELL::Config3pm

Usage

    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 );

Overview

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.

Exports

This module exports three scalars: the 'singleton' objects $meta, $core, and $site.

Subroutines

Autoload

The "AUTOLOAD" routine handles calls that look like this:
$meta->MY_PARAM
$core->MY_PARAM
$site->MY_PARAM

Destroy

For some reason, Perl 5.012 seems to want a DESTROY method

exists

Determine parameter existence.

get

Wrapper for get_param

get_param

Get value of config param provided in the argument.

get_param_metadata

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.

set

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.

Releases

5 releases since Debian 9 (Stretch); the text changed 3 times.

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

From libapp-cell-perl 0.231-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.