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

  
 
  

home | help
dnsjit.lib.parseconf(3)     Library Functions Manual	 dnsjit.lib.parseconf(3)

NAME
     dnsjit.lib.parseconf - Parse simple config files

SYNOPSIS
       local conf = require("dnsjit.lib.parseconf").new()

       conf:func("config_name", function(k,...)
	   print(k,...)
       end)

       conf:file(file)

       print(conf:val("another_config_name"))

DESCRIPTION
     This  module parses simple config files that are based on the config syntax
     of DSC, drool and parseconf helper library.  Each config begins with a name
     followed by options and ends with a ;.  Multiple configs can  be  given  on
     the  same	line.	Valid  option  types  are  number, float, string, quoted
     string.  Comments can be added by prefixing the comment with #.

   Example
       # Comment
       number 12345;
       float 123.456;
       string string string;
       quoted_string "string string string";
       multi config; on one line;

   Functions
     Parseconf.new()
	    Create a new Parseconf object.

     Parseconf:log()
	    Return the Log object to control logging of this instance or module.

     Parseconf:func(name, func)
	    Set a function to call when config name is found.

     Parseconf:file(fn)
	    Parse the given file.

     Parseconf:line(l)
	    Parse the given line.

     Parseconf:val(name)
	    Get the value of a config name.

AUTHORS and CONTRIBUTORS
     Jerry LundstrA<paragraph>m (DNS-OARC),  TomA!A!  KAAA3/4ek  (CZ.NIC),  Petr
     A paAek (ISC)

     Maintained by DNS-OARC

	    https://www.dns-oarc.net/

BUGS
     For issues and feature requests please use:

	    https://github.com/DNS-OARC/dnsjit/issues

     For question and help please use:

	    admin@dns-oarc.net

dnsjit				      1.4.0		 dnsjit.lib.parseconf(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=dnsjit.lib.parseconf&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help