NAME

Jifty::Config -- wrap a jifty configuration file

DESCRIPTION

METHODS

new PARAMHASH

This class method instantiates a new Jifty::Config object. This object deals with configuration files. After it is created, it calls "load".

load

First, several defaults are assumed based on the name of the application -- see "guess". Then, Jifty loads the main configuration file for the application, looking for the JIFTY_CONFIG environment variable or etc/config.yml under the application's base directory.

It uses the main contifuration file to find a vendor configuration file -- if it doesn't find a framework variable named 'VendorConfig', it will use the JIFTY_VENDOR_CONFIG environment variable.

After loading the vendor configuration file (if it exists), the framework will look for a site configuration file, specified in either the framework's SiteConfig or the JIFTY_SITE_CONFIG environment variable.

Values in the site configuration file clobber those in the vendor configuration file. Values in the vendor configuration file clobber those in the application configuration file.

If the value begins and ends with %, converts it with Jifty::Util/absolute_path to an absolute path. (This is unnecessary for most configuration variables which specify files, but is needed for variables such as MailerArgs that only sometimes specify files.)

framework VARIABLE

Get the framework configuration variable VARIABLE.

app VARIABLE

Get the application configuration variable VARIABLE.

guess

Attempts to guess (and return) a configuration hash, in the absence of a configuration file. It uses the name of the directory containing the Jifty binary as the name of the application and database.

load_file PATH

Loads a YAML configuration file and returns a hashref to that file's data.

AUTHOR

Various folks at BestPractical Solutions, LLC.