mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +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:
parent
531792f152
commit
4136991831
@ -205,16 +205,18 @@ sub _cfgDB_dump($);
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
my ($err,@config);
|
my ($err,@c) = FileRead({FileName => 'configDB.conf',
|
||||||
|
|
||||||
($err,@config) = FileRead({FileName => 'configDB.conf',
|
|
||||||
ForceType => "file"});
|
ForceType => "file"});
|
||||||
|
|
||||||
return 0 if ($err);
|
return 0 if ($err);
|
||||||
|
|
||||||
@config = map { $_ =~ s/^\s+|\s+$//g; } @config;
|
my @config;
|
||||||
@config = map { $_ =~ s/;$/;;/;} @config;
|
|
||||||
@config = map { $_ ? $_ : (); } @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;
|
use Data::Dumper;
|
||||||
print Dumper @config;
|
print Dumper @config;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user