NAME
Slackware::SBoKeeper::Config - Configuration file reader
SYNOPSIS
use Slackware::SBoKeeper::Config qw(read_config);
my $config = read_config($file, $callbacks);
DESCRIPTION
Slackware::SBoKeeper::Config is a module that provides the read_config()
subroutine, which can read sbokeeper config files. Slackware::SBoKeeper::Config is not meant to be used outside of sbokeeper. If you are looking for sbokeeper user documentation, please consult its manual.
SUBROUTINES
- read_config($file, $callbacks)
-
read_config
is a subroutine that reads the config file$file
and returns its contents in the form of a hash ref.$callbacks
is a hash ref of config fields and their respective callback subroutine references that process the value of said field.$callbacks
must contain every field that is able to be read, otherwiseread_config
will fail on unknown fields.Configuration files consists of lines of key-value pairs, seperated by an equal sign (=). Blank lines and comments are ignored.
read_config
must be manually imported.
AUTHOR
Written by Samuel Young, <samyoung12788@gmail.com>.
BUGS
Report bugs on my Codeberg, https://codeberg.org/1-1sam.
COPYRIGHT
Copyright (C) 2024 Samuel Young
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.