From 0cdbf7b07d96646d76def6a39df7ddf0b4c978eb Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 5 Mar 2013 13:13:33 +0100 Subject: [PATCH] =?utf8?q?$::lxdebug->dump()=20gibt=20den=20gedumpten=20Te?= =?utf8?q?xt=20zus=C3=A4tzlich=20als=20R=C3=BCckgabewert=20zur=C3=BCck?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/LXDebug.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/SL/LXDebug.pm b/SL/LXDebug.pm index e4e0cb272..17009ddcf 100644 --- a/SL/LXDebug.pm +++ b/SL/LXDebug.pm @@ -170,7 +170,8 @@ sub dump { $dumper->Sortkeys(1); $dumper->Indent(2); $dumper->$_($options{$_}) for keys %options; - $self->message($level, "dumping ${name}:\n" . $dumper->Dump()); + my $output = $dumper->Dump(); + $self->message($level, "dumping ${name}:\n" . $output); $variable->{password} = $password if (defined $password); @@ -181,10 +182,14 @@ sub dump { keys %{ $variable }; } + return $output; + } else { $self->message($level, "dumping ${name}: Data::Dumper not available; " . "variable cannot be dumped"); + + return undef; } } -- 2.20.1