From 6e00b261a86eaa1ba0bc9da62bd2f42f94e1bac8 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 1 Jun 2007 09:14:41 +0000 Subject: [PATCH] Codevereinfachung --- SL/LXDebug.pm | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/SL/LXDebug.pm b/SL/LXDebug.pm index 87bfd7f7c..d902e2ab2 100644 --- a/SL/LXDebug.pm +++ b/SL/LXDebug.pm @@ -151,15 +151,9 @@ sub dump_sql_result { return; } - my %column_lengths; - my $first_row = 1; + my %column_lengths = map { $_, length $_ } keys %{ $results->[0] }; foreach my $row (@{ $results }) { - if ($first_row) { - map { $column_lengths{$_} = length $_ } keys %{ $row }; - $first_row = 0; - } - map { $column_lengths{$_} = length $row->{$_} if (length $row->{$_} > $column_lengths{$_}) } keys %{ $row }; } -- 2.20.1