From 87fbdee5cb415ca93f35ff32e11c6a720607673e Mon Sep 17 00:00:00 2001 From: nasseeder1 Date: Sun, 28 Mar 2021 18:14:51 +0000 Subject: [PATCH] 98_Analyze.pm: contrib 0.2.0 git-svn-id: https://svn.fhem.de/fhem/trunk@24111 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/contrib/DS_Starter/98_Analyze.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fhem/contrib/DS_Starter/98_Analyze.pm b/fhem/contrib/DS_Starter/98_Analyze.pm index d85f3b901..80d3c88e4 100644 --- a/fhem/contrib/DS_Starter/98_Analyze.pm +++ b/fhem/contrib/DS_Starter/98_Analyze.pm @@ -3,7 +3,7 @@ ######################################################################################################################### # 98_Analyze.pm # -# (c) 2020 by Heiko Maaz +# (c) 2020-2021 by Heiko Maaz # e-mail: Heiko dot Maaz at t-online dot de # # This Module analyzes the data structure size in FHEM @@ -89,6 +89,7 @@ BEGIN { # Versions History intern my %vNotesIntern = ( + "0.2.0" => "28.03.2021 bug fix ", "0.1.0" => "25.11.2020 initial " ); @@ -531,7 +532,6 @@ return; ###################################################################################### # check valide Referenz -# return undef wenn Referenz ok. ###################################################################################### sub checkRef { my $name = shift; @@ -539,17 +539,20 @@ sub checkRef { my $obj = shift; my $ref = q{}; + my $val; if ($obj) { eval {$ref = ref $oref->{$obj}}; + $val = $oref->{$obj}; } else { eval {$ref = ref $oref}; + $val = $oref; } return if($ref ne q{}); # Referenz ok - my $ret = "no ref found. Dumper value:\n".Dumper $obj ? $oref->{$obj} : $oref; + my $ret = "No ref found. Try print value of the key:\n\n".Dumper $val; Log3($name, 4, "$name - $ret"); return $ret;