X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FStats.pm;h=615cde1dbc4fcc252914a1831b0f7a550750eff0;hp=247e1bd8d03cefb0a6ca120ff4c04e8b7b77166d;hb=39fc2ce1e456c4e2a272204aa8fe67896984b3a6;hpb=e358ade7c046b92ae117b0b242ac1a24e22b0d92 diff --git a/lib/Catalyst/Stats.pm b/lib/Catalyst/Stats.pm index 247e1bd..615cde1 100644 --- a/lib/Catalyst/Stats.pm +++ b/lib/Catalyst/Stats.pm @@ -3,6 +3,7 @@ package Catalyst::Stats; use Moose; use Time::HiRes qw/gettimeofday tv_interval/; use Text::SimpleTable (); +use Catalyst::Utils; use Tree::Simple qw/use_weak_refs/; use Tree::Simple::Visitor::FindByUID; @@ -88,7 +89,8 @@ sub elapsed { sub report { my $self = shift; - my $t = Text::SimpleTable->new( [ 62, 'Action' ], [ 9, 'Time' ] ); + my $column_width = Catalyst::Utils::term_width() - 9 - 13; + my $t = Text::SimpleTable->new( [ $column_width, 'Action' ], [ 9, 'Time' ] ); my @results; $self->traverse( sub {