2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-01 01:09:47 +00:00

betateilchen: debug code

git-svn-id: https://svn.fhem.de/fhem/trunk@18300 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
betateilchen 2019-01-17 15:30:13 +00:00
parent 531792f152
commit 4136991831

View File

@ -205,16 +205,18 @@ sub _cfgDB_dump($);
#
my ($err,@config);
($err,@config) = FileRead({FileName => 'configDB.conf',
my ($err,@c) = FileRead({FileName => 'configDB.conf',
ForceType => "file"});
return 0 if ($err);
@config = map { $_ =~ s/^\s+|\s+$//g; } @config;
@config = map { $_ =~ s/;$/;;/;} @config;
@config = map { $_ ? $_ : (); } @config;
my @config;
foreach my $line (@c) {
$line =~ s/^\s+|\s+$//g; # remove whitespaces etc.
$line =~ s/;$/;;/; # duplicate ; at end-of-line
push (@config,$line) if($line !~ m/^#/ && length($line) > 0);
}
use Data::Dumper;
print Dumper @config;