From 308b67ec56f178d004e17b35067321ec06665ab6 Mon Sep 17 00:00:00 2001 From: borisneubert <> Date: Sat, 19 Nov 2011 16:08:42 +0000 Subject: [PATCH] enable support for continuation lines git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@1112 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/66_ECMD.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/FHEM/66_ECMD.pm b/FHEM/66_ECMD.pm index c84e4fcf5..4ca9d521b 100644 --- a/FHEM/66_ECMD.pm +++ b/FHEM/66_ECMD.pm @@ -482,13 +482,17 @@ ECMD_EvalClassDef($$$) # set stop cmd {"io set ddr 2 ff\nio set port 2 1%btnstop\nwait 1000\nio set port 2 00"} # set down cmd {"io set ddr 2 ff\nio set port 2 1%btndown\nwait 1000\nio set port 2 00"} + my $cont= ""; foreach my $line (@classdef) { # kill trailing newline chomp $line; # kill comments and blank lines $line=~ s/\#.*$//; $line=~ s/\s+$//; + $line= $cont . $line; + if($line=~ s/\\$//) { $cont= $line; undef $line; } next unless($line); + $cont= ""; Log 5, "$name: evaluating >$line<"; # split line into command and definition my ($cmd, $def)= split("[ \t]+", $line, 2);