2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-05-01 18:39:00 +00:00

: minor code cleanup

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

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};