From 09357f54df827e0d90454f4d0cfeb3f8d0f06a80 Mon Sep 17 00:00:00 2001 From: betateilchen <> Date: Tue, 31 Mar 2020 11:01:06 +0000 Subject: [PATCH] : minor code cleanups git-svn-id: https://svn.fhem.de/fhem/trunk@21551 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/98_count.pm | 4 ++-- fhem/FHEM/98_help.pm | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fhem/FHEM/98_count.pm b/fhem/FHEM/98_count.pm index e88a675f3..609a0cb16 100644 --- a/fhem/FHEM/98_count.pm +++ b/fhem/FHEM/98_count.pm @@ -4,12 +4,12 @@ package main; use strict; use warnings; -sub count_Initialize($$) { +sub count_Initialize { $cmds{count} = { Fn => "CommandCount", Hlp=>"[filter],count devices"}; } -sub CommandCount($$) +sub CommandCount { my ($cl, $param) = @_; my $str = ""; diff --git a/fhem/FHEM/98_help.pm b/fhem/FHEM/98_help.pm index 951e649de..d5a9ec053 100644 --- a/fhem/FHEM/98_help.pm +++ b/fhem/FHEM/98_help.pm @@ -15,7 +15,7 @@ sub cref_fill_list; sub cref_findInfo; -sub help_Initialize($$) { +sub help_Initialize { my %hash = ( Fn => "CommandHelp", Hlp => "[],get help (this screen or module dependent docu)", InternalCmds => cref_internals() ); @@ -241,8 +241,8 @@ sub cref_fill_list(){ $l =~ s/^[0-9][0-9]_//; $mods{$l} = "$modDir/$of"; $modIdx{$l} = "device"; - open(MOD, "$modDir/$of") || die("Cant open $modDir/$l"); - while(my $cl = ) { + open(my $MOD, "<", "$modDir/$of") || die("Cant open $modDir/$l"); + while(my $cl = <$MOD>) { if($cl =~ m/^=item\s+(helper|command|device)/) { $modIdx{$l} = $1; last; @@ -263,7 +263,7 @@ sub cref_findInfo { my ($modPath,$mod) = @_; my ($l,@line,$found,$text); my ($err,@text) = FileRead({FileName => "$modPath/MAINTAINER.txt", ForceType => 'file'}); - foreach $l (@text) { + foreach my $l (@text) { @line = split("[ \t][ \t]*", $l,3); $found = ($l =~ m/.._$mod.pm/i); # $found = ($l =~ m/_$mod/i);