From 37da37cbcbdfd9a7361dda26d0d8c20dc988bfc2 Mon Sep 17 00:00:00 2001 From: markusbloch Date: Sat, 21 Nov 2015 22:59:57 +0000 Subject: [PATCH] 98_help.pm: fix perl warnings, optimizing telnet output regex (Forum: #44300) git-svn-id: https://svn.fhem.de/fhem/trunk@9958 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/98_help.pm | 63 ++++++++++++++++++-------------------------- 1 file changed, 25 insertions(+), 38 deletions(-) diff --git a/fhem/FHEM/98_help.pm b/fhem/FHEM/98_help.pm index 184771387..dc8963094 100644 --- a/fhem/FHEM/98_help.pm +++ b/fhem/FHEM/98_help.pm @@ -26,10 +26,10 @@ sub CommandHelp { $lang //= AttrVal('global','language','en'); $lang = (lc($lang) eq 'de') ? '_DE' : ''; - $mod =~ s/\?/help/; - if($mod) { + $mod = "help" if($mod eq "?"); + my $internals = "attributes,command,commands,devspec,global,perl"; $mod = lc($mod); my $modPath = AttrVal('global','modpath','.'); @@ -85,44 +85,16 @@ sub CommandHelp { } - my $url_prefix; - - if(AttrVal('global','exclude_from_update','') =~ m/commandref/) { - $url_prefix = "http://fhem.de/commandref$lang.html"; - } else { - $url_prefix = "$FW_ME/docs/commandref$lang.html"; - } - - # replace tags with a - # working real link to commandref - $output =~ s, tags with a + # working real link to commandref + $output =~ s,$output"; } - return "$output"; + return $output; } else { # mod