Krang::Conf - Krang configuration module
# all configuration directives are available as exported subs use Krang::ClassLoader Conf => qw(KrangRoot Things); $root = KrangRoot; @thinks = Things;
# you can also call get() in Krang::Conf directly
$root = pkg('Conf')->get("KrangRoot");
# or you can access them as methods in the Krang::Conf module
$root = pkg('Conf')->rootdir;
# the current instance, which affects the values returned, can
# manipulated with instance():
pkg('Conf')->instance("this_instance");
# get a list of available instances
@instances = pkg('Conf')->instances();
This module provides access to the configuration settings in
krang.conf. The routines provided will return the correct settings
based on the currently active instance, accesible and setable using
Krang::Conf->instance().
Full details on all configuration parameters is available in the configuration document, which you can find at:
http://krang.sourceforge.net/docs/configuration.html
$value = Krang::Conf->get("DirectiveName")@values = Krang::Conf->get("DirectiveName")$value = Krang::Conf->directivenamehere()@values = Krang::Conf->directivenamehere()$value = ExportedDirectiveName()@values = ExportedDirectiveName()$current_instance = Krang::Conf->instance()Krang::Conf->instance("instance name")Before the first call to instance() only globally declared variables
are available. Setting the instance to undef will recreate this
state.
@instances = Krang::Conf->instances()Krang::Conf->check()die() with an error
message if something is wrong with the configuration file.
This is run when the Krang::Conf loads unless the environment variable ``KRANK_CONF_NOCHECK'' is set to a true value.