Author image Robert Kiesling

NAME

OnSearch::AppConfig - Configuration library for OnSearch search engine.

DESCRIPTION

OnSearch::AppConfig provides an object oriented configuration library that dynmaically manages the configuration of an operating search engine.

The libraries provide subroutines and methods to retrieve settings from the configuration file onsearch.cfg and manage user preferences.

EXPORTS

new (ref);

This is the OnSearch::AppConfig constructor.

DESTROY (ref);

Perl calls the DESTROY method to delete unused OnSearch::AppConfig objects.

METHODS

$cfg -> defaultvolume ();

If onsearch.cfg does not define any volumes, defaultvolume () returns the hash for the volume, "Default," which is normally the directory value of, "SearchRoot."

$cfg -> WebLogDir ();

Returns the name of OnSearch's Web log directory.

$cfg -> have_config ();

Returns 1 if onsearch.cfg has been read and processed, or undef.

$cfg -> read_config (file_name);

Read the OnSearch settings from the file name given as the argument.

$cfg -> prefs_val (query_object);

Formats and encodes the value of a search preferences cookie from the OnSearch::CGIQuery object given as the argument.

webidx_prefs_val (query_object);

Formats the value of the Web index cookie from the values in the OnSearch::CGIQuery object given as the argument.

$cfg -> vols_prefs_val (query_object);

Formats the value of the volume preferences cookie from the values in the argument's OnSearch::CGIQuery object

$cfg -> get_prefs (value);

Return the preferences from the cookie value given in the argument.

$cfg -> parse_prefs (str);

Return a hash of preference key/value pairs.

$cfg -> Volumes ();

Return a hash of the volumes configured in onsearch.cfg.

$cfg -> lst (key);

Return the list of configuration values for the setting given as the argument.

$cfg -> str (key);

Return the value of the onsearch.cfg setting given as the argument.

$cfg -> on (key);

Returns 1 if the value of the onsearch.cfg setting given as the argument is non-zero, or undef otherwise.

$cfg -> CONFIG ();

Return the $Config hash reference.

new (classref);

This is the OnSearch::AppConfig constructor.

$cfg -> DESTROY ();

The OnSearch::AppConfig class destructor. Perl also calls DESTROY to delete unused OnSearch::AppConfig ojbects.

Returns 1 if the file name given as the argument is a symlink, or undef otherwise.

VERSION AND CREDITS

$Id: AppConfig.pm,v 1.8 2005/07/24 07:57:21 kiesling Exp $

Written by Robert Kiesling <rkies@cpan.org> and licensed under the same terms as Perl. Refer to the file, "Artistic," for information.

SEE ALSO

OnSearch(3)