Jifty::Config -- wrap a jifty configuration file
This class method instantiates a new Jifty::Config object. This object deals with configuration files.
Jifty::Config
PARAMHASH currently takes a single option
This boolean defaults to true. If true, "load" will be called upon initialization.
Jifty first 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.
JIFTY_CONFIG
etc/config.yml
It uses the main configuration 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.
JIFTY_VENDOR_CONFIG
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.
SiteConfig
JIFTY_SITE_CONFIG
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.
Once we're all done loading from files, several defaults are assumed based on the name of the application -- see "guess".
After we have the config file, we call the coderef in $Jifty::Config::postload, if it exists.
$Jifty::Config::postload
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.)
Jifty::Util/absolute_path
MailerArgs
Get the framework configuration variable VARIABLE.
VARIABLE
Get the application configuration variable VARIABLE.
Attempts to guess (and return) a configuration hash based solely on what we already know. (Often, in the complete absence of a configuration file). It uses the name of the directory containing the Jifty binary as a default for ApplicationName if it can't find one.
ApplicationName
We have a couple default values that shouldn't be included in the "guessed" config, as that routine is used when initializing a new application. Generally, these are platform-specific file locations.
Loads a YAML configuration file and returns a hashref to that file's data.
Various folks at BestPractical Solutions, LLC.
To install Jifty, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Jifty
CPAN shell
perl -MCPAN -e shell install Jifty
For more information on module installation, please visit the detailed CPAN module installation guide.