MHArc::Config - Load mail archive configuration file |
MHArc::Config - Load mail archive configuration file
$conf = MHArc::Config->load($filename); print $conf->{'HTML_DIR'};
This module will load in the archive configuration file. The archive configuration file defines variables in Bourne shell syntax format.
NOTE: Only a subset of the Bourne shell syntax is supported, so do not get fancy with the file.
The load
static method will create a new configuration instance
that is a bless hash reference. The variables defined in the file
will be the hash keys.
NOTE: If the filename specified does not exist, then the load()
method will check for the filename with a .dist
extension. It
is recommended to not rely on the .dist
version since it will
get overwritten on software updates.
This module will create a cached version of the file loaded to
make subsequent loadings quicker. The cached file will be called
<filename>.cache.pl
and will contain the configuration
data in a Perl format.
When loading the configuration of a file, the timestamps of the cache file and the regular file are compared. If the cache is newer, it is used. Else, the regular file will be loaded and a new cache file created.
$MHArc::Config::Cache
0
, no cache processing will be done. Configuration will
be loaded directly from specified file.
$MHArc::Config::Debug
1
, diagnostic information will be printed. This variable
should only be used for debugging and not in production.
$Id: Config.pm,v 1.8 2002/09/20 02:58:38 ehood Exp $
Earl Hood, earl@earlhood.com
This module is part of the mharc archiving system and comes with ABSOLUTELY NO WARRANTY and may be copied only under the terms of the GNU General Public License, which may be found in the MHArc distribution.
MHArc::Config - Load mail archive configuration file |