: minor code cleanups

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@21551 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
betateilchen 2020-03-31 11:01:06 +00:00
parent 73b0d0e9a0
commit 702c1afa29
2 changed files with 6 additions and 6 deletions

View File

@ -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 = "";

View File

@ -15,7 +15,7 @@ sub cref_fill_list;
sub cref_findInfo;
sub help_Initialize($$) {
sub help_Initialize {
my %hash = ( Fn => "CommandHelp",
Hlp => "[<moduleName>],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 = <MOD>) {
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);