Module pl.config
reads configuration files into a Lua table.
Understands INI files, classic Unix config files, and simple delimited columns of values.
Functions
lines (file) | like io.lines(), but allows for lines to be continued with '\'. |
read (file, cnfg) | read a configuration file into a table |
Functions
- lines (file)
-
like io.lines(), but allows for lines to be continued with '\'.
Parameters:
-
file
: a file-like object (anything where read() returns the next line) or a filename. Defaults to stardard input.
Return value:
- an iterator over the lines
-
- read (file, cnfg)
-
read a configuration file into a table
Parameters:
-
file
: either a file-like object or a string, which must be a filename -
cnfg
: a configuration table
Return value:
- nil,error_msg in case of an error, otherwise a table containing items
-