1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-03-05 15:05:48 +02:00

Documentation for config functions.

This commit is contained in:
David Steele 2014-09-18 16:41:36 -04:00
parent fd12299ecd
commit 82f22dd9fe

View File

@ -495,14 +495,16 @@ sub log
}
####################################################################################################################################
# CONFIG_LOAD - Load config file
# CONFIG_LOAD
#
# Load configuration file from standard INI format to a hash.
####################################################################################################################################
sub config_load
{
my $strFile = shift;
my $oConfig = shift;
my $strFile = shift; # Full path to config file to load from
my $oConfig = shift; # Reference to the hash where config data will be stored
# Open the config file
# Open the config file for reading
my $hFile;
my $strSection;
@ -552,18 +554,21 @@ sub config_load
}
####################################################################################################################################
# CONFIG_SAVE - Save config file
# CONFIG_SAVE
#
# Save configuration file from a hash to standard INI format.
####################################################################################################################################
sub config_save
{
my $strBackupManifestFile = shift;
my $oConfig = shift;
my $strFile = shift; # Full path to config file to save to
my $oConfig = shift; # Reference to the hash where config data is stored
# Open the config file for writing
my $hFile;
my $bFirst = true;
open($hFile, '>', $strBackupManifestFile)
or confess &log(ERROR, "unable to open ${strBackupManifestFile}");
open($hFile, '>', $strFile)
or confess &log(ERROR, "unable to open ${strFile}");
foreach my $strSection (sort(keys $oConfig))
{