Commit a92a47b7 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

* Fixed up Config::IniFiles usage, this fixes breakage introduced with...

* Fixed up Config::IniFiles usage, this fixes breakage introduced with functionality changes in newer versions

parent 058756ef
......@@ -101,7 +101,8 @@ sub configure {
) or die "Failed to open config file '".$cfg->{'config_file'}."': $!";
# Copy config
my %config = %inifile;
untie(%inifile);
# FIXME: This now generates a warning as Config::Inifiles doesn't implement UNTIE
# untie(%inifile);
# Pull in params for the server
my @server_params = (
......@@ -139,13 +140,19 @@ sub configure {
if (!defined($config{'server'}{'protocols'})) {
die "Server configuration error: 'protocols' not found";
}
foreach my $module (@{$config{'server'}{'modules'}}) {
$module =~ s/\s+//g;
# Split off modules
my @moduleList = split(/\s+/,$config{'server'}{'modules'});
foreach my $module (@moduleList) {
# Skip comments
next if ($module =~ /^#/);
$module = "modules/$module";
push(@{$cfg->{'module_list'}},$module);
}
foreach my $module (@{$config{'server'}{'protocols'}}) {
$module =~ s/\s+//g;
# Split off protocols
my @protocolList = split(/\s+/,$config{'server'}{'protocols'});
foreach my $module (@protocolList) {
# Skip comments
next if ($module =~ /^#/);
$module = "protocols/$module";
push(@{$cfg->{'module_list'}},$module);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment