More tolerance for config files
This commit is contained in:
parent
28a89c70c9
commit
ea254588f7
@ -296,6 +296,8 @@ sub load {
|
|||||||
|
|
||||||
open my $fh, '<', $file;
|
open my $fh, '<', $file;
|
||||||
while (<$fh>) {
|
while (<$fh>) {
|
||||||
|
next if /^\s+/;
|
||||||
|
next if /^$/;
|
||||||
next if /^\s*#/;
|
next if /^\s*#/;
|
||||||
/^(\w+) = (.*)/ or die "Unreadable configuration file (invalid data at line $.)\n";
|
/^(\w+) = (.*)/ or die "Unreadable configuration file (invalid data at line $.)\n";
|
||||||
my $key = $1;
|
my $key = $1;
|
||||||
|
Loading…
Reference in New Issue
Block a user