GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
DNSCheck::Config(3) User Contributed Perl Documentation DNSCheck::Config(3)

DNSCheck::Config - Read config files and make their contents available to other modules.

Reads any config files, specified and/or default ones, stores their contents and provides methods that other modules can use to fetch them.

There are two distinct classes of configuration information, that reside in separate files. There is configuration, which modifies how things run. This is, for example, network timeouts, database connection information, file paths and such. In addition to this there is policy, which specifies things about the tests that get run. Most importantly, the policy information specifies the reported severity level of various test failures.

By default, "DNSCheck::Config" will look for four different files: policy.yaml, config.yaml, site_policy.yaml and site_config.yaml. Only the first two exist by default. If the second two exist, they will override values in their respective non-site file. Local changes should go in the site files, since the default files will get overwritten when a new DNSCheck version is installed.

These four files will be looked for in a number of places: a config directory, the current working directory (as determined by the Cwd module) and the directory where the running script file is stored (as determined by the FindBin module). By default, the config directory is share/dnscheck under the root directory for the Perl installation. This can be changed via the "configdir" (for config.yaml and policy.yaml) and "sitedir" (for site_config.yalm and site_policy.yaml) parameters.

The default lookup of a file is disregarded if the parameter giving the full path to that file is used.

There is no protection against having the same keys in the configuration and policy files. The configuration/policy distinction is entirely for human use, and if they want to put everything in the same bucket they're perfectly welcome to do so.

->new(parameter => $value)
The "new" method creates a new "DNSCheck::Config" object. It takes named parameters in the perl/Tk style (but without the initial dashes).

The available parameters are these:

configdir
The path to the directory in which the module should look for configuration and policy files.
sitedir
The path to the directory where the site configuration files are. By default the same as configdir.
configfile
The full path to the configuration file.
siteconfigfile
The full path to the site configuration file.
policyfile
The full path to the policy file.
sitepolicyfile
The full path to the site policy file.
locale
The locale to be used for messages. This is supposed to be only a string with the locale, for example "en" or "sv". The actual filename will be figured out from that.
localefile
The full path to the actual YAML file holding the locale information to be used.
interactive
If this key is a true value, the logger object will be set to print entries to stdout as they are added, rather than store them for future use.
extras
A hashref with random stuff that'll be copied to the Config object.
->get($key)
Simply returns whatever got read from the configuration or policy files under the given key.
2010-06-29 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.