[Catalyst-commits] r13087 - Catalyst-Runtime/5.80/trunk/lib
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Sun Mar 28 18:25:42 GMT 2010
Author: t0m
Date: 2010-03-28 19:25:41 +0100 (Sun, 28 Mar 2010)
New Revision: 13087
Modified:
Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm
Log:
Make the tables from the log_headers method scale to term size nicely
Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm 2010-03-28 18:18:45 UTC (rev 13086)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm 2010-03-28 18:25:41 UTC (rev 13087)
@@ -2278,7 +2278,8 @@
return unless $c->debug;
- my $t = Text::SimpleTable->new( [ 35, 'Header Name' ], [ 40, 'Value' ] );
+ my $column_width = Catalyst::Utils::term_width() - 28;
+ my $t = Text::SimpleTable->new( [ 15, 'Header Name' ], [ $column_width, 'Value' ] );
$headers->scan(
sub {
my ( $name, $value ) = @_;
More information about the Catalyst-commits
mailing list