From 9c1048cc631d86456cf684d7c8db4d66e8f162c3 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 3 May 2013 13:18:18 +0200 Subject: [PATCH] =?utf8?q?Kosmetik:=20Einr=C3=BCckung=20nach=20Entfernung?= =?utf8?q?=20umliegender=20"if=20()"?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/LXDebug.pm | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/SL/LXDebug.pm b/SL/LXDebug.pm index 057ec06a1..13f86a71a 100644 --- a/SL/LXDebug.pm +++ b/SL/LXDebug.pm @@ -152,29 +152,29 @@ sub warn { sub dump { my ($self, $level, $name, $variable, %options) = @_; - my $password; - if ($variable && ('Form' eq ref $variable) && defined $variable->{password}) { - $password = $variable->{password}; - $variable->{password} = 'X' x 8; - } - - my $dumper = Data::Dumper->new([$variable]); - $dumper->Sortkeys(1); - $dumper->Indent(2); - $dumper->$_($options{$_}) for keys %options; - my $output = $dumper->Dump(); - $self->message($level, "dumping ${name}:\n" . $output); - - $variable->{password} = $password if (defined $password); - - # Data::Dumper does not reset the iterator belonging to this hash - # if 'Sortkeys' is true. Therefore clear the iterator manually. - # See "perldoc -f each". - if ($variable && (('HASH' eq ref $variable) || ('Form' eq ref $variable))) { - keys %{ $variable }; - } - - return $output; + my $password; + if ($variable && ('Form' eq ref $variable) && defined $variable->{password}) { + $password = $variable->{password}; + $variable->{password} = 'X' x 8; + } + + my $dumper = Data::Dumper->new([$variable]); + $dumper->Sortkeys(1); + $dumper->Indent(2); + $dumper->$_($options{$_}) for keys %options; + my $output = $dumper->Dump(); + $self->message($level, "dumping ${name}:\n" . $output); + + $variable->{password} = $password if (defined $password); + + # Data::Dumper does not reset the iterator belonging to this hash + # if 'Sortkeys' is true. Therefore clear the iterator manually. + # See "perldoc -f each". + if ($variable && (('HASH' eq ref $variable) || ('Form' eq ref $variable))) { + keys %{ $variable }; + } + + return $output; } sub dump_yaml { -- 2.20.1