: minor code cleanup

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@21555 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
betateilchen 2020-03-31 11:54:08 +00:00
parent 141cacdf0f
commit 4b8518af01

View File

@ -241,17 +241,20 @@ sub CommandConfigdb {
}
sub _cfgDB_readConfig() {
if(!open(my $CONFIG, '<', 'configDB.conf')) {
my ($conf,@config);
if(!open($conf, '<', 'configDB.conf')) {
Log3('configDB', 1, 'Cannot open database configuration file configDB.conf');
return 0;
}
my @config=<$CONFIG>;
close($CONFIG);
my @config=<$conf>;
close($conf);
use vars qw(%configDB);
my %dbconfig;
eval { join("", @config) };
## no critic
eval join("", @config) ;
## critic
my $cfgDB_dbconn = $dbconfig{connection};
my $cfgDB_dbuser = $dbconfig{user};