Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
DNSCheck::Config(3)   User Contributed Perl Documentation  DNSCheck::Config(3)

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

DESCRIPTION
       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.

METHODS
       ->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.

perl v5.32.0			  2010-06-29		   DNSCheck::Config(3)

NAME | DESCRIPTION | METHODS

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=DNSCheck::Config&sektion=3&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help