Allow to parse any json-file as loosely formatted (not only config.json)

This commit is contained in:
eleksir
2022-05-13 18:05:15 +03:00
parent b2af26d4e6
commit bec963c7b3

View File

@@ -14,7 +14,7 @@ use Exporter qw (import);
our @EXPORT_OK = qw (LoadConf); our @EXPORT_OK = qw (LoadConf);
sub LoadConf { sub LoadConf {
my $c = 'data/config.json'; my $c = shift // 'data/config.json';
my $CH; my $CH;
unless (open $CH, '<', $c) { unless (open $CH, '<', $c) {