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_configis a subroutine that reads the config file$fileand returns its contents in the form of a hash ref.$callbacksis a hash ref of config fields and their respective callback subroutine references that process the value of said field.$callbacksmust contain every field that is able to be read, otherwiseread_configwill fail on unknown fields.Configuration files consists of lines of key-value pairs, seperated by an equal sign (=). Blank lines and comments are ignored.
The subroutines in
$callbackscan take two arguments, the first is the value of the field and the second is a hash ref of extra data that might be useful to the subroutine. The hash ref can have the following fields:- File
-
Absolute path of the config file being read.
read_configmust 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-2025 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.