Revision 6e00b261
Von Moritz Bunkus vor etwa 18 Jahren hinzugefügt
SL/LXDebug.pm | ||
---|---|---|
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 };
|
||
}
|
||
|
Auch abrufbar als: Unified diff
Codevereinfachung