X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FEngine.pm;h=16385dc33941d452d6ee69e1c9729418f9df867e;hp=8dee01f527d7cc86ff656157b00829678b36829a;hb=0822f9a43c8f0b885b240c177cc654ab835b3b14;hpb=f5f8484715d3cd05e18db061d27705fbc905bb4c diff --git a/lib/Catalyst/Engine.pm b/lib/Catalyst/Engine.pm index 8dee01f..16385dc 100644 --- a/lib/Catalyst/Engine.pm +++ b/lib/Catalyst/Engine.pm @@ -486,6 +486,9 @@ sub handler { my $av = sprintf '%.3f', 1 / $elapsed; my $t = Text::ASCIITable->new; $t->setCols( 'Action', 'Time' ); + $t->setColWidth( 'Action', 65, 1 ); + $t->setColWidth( 'Time', 8, 1 ); + for my $stat (@stats) { $t->addRow(@$stat); } @@ -553,6 +556,8 @@ sub prepare { if ( $c->debug && keys %{ $c->req->params } ) { my $t = Text::ASCIITable->new; $t->setCols( 'Key', 'Value' ); + $t->setColWidth( 'Key', 37, 1 ); + $t->setColWidth( 'Value', 36, 1 ); for my $key ( keys %{ $c->req->params } ) { my $value = $c->req->params->{$key} || ''; $t->addRow( $key, $value ); @@ -854,12 +859,16 @@ sub setup_components { } my $t = Text::ASCIITable->new; $t->setCols('Class'); + $t->setColWidth( 'Class', 75, 1 ); $t->addRow($_) for keys %{ $self->components }; $self->log->debug( 'Loaded components', $t->draw ) if ( @{ $t->{tbl_rows} } && $self->debug ); my $actions = $self->actions; my $privates = Text::ASCIITable->new; $privates->setCols( 'Action', 'Class', 'Code' ); + $privates->setColWidth( 'Action', 28, 1 ); + $privates->setColWidth( 'Class', 28, 1 ); + $privates->setColWidth( 'Code', 14, 1 ); my $walker = sub { my ( $walker, $parent, $prefix ) = @_; $prefix .= $parent->getNodeValue || ''; @@ -876,6 +885,10 @@ sub setup_components { if ( @{ $privates->{tbl_rows} } && $self->debug ); my $publics = Text::ASCIITable->new; $publics->setCols( 'Action', 'Class', 'Code' ); + $publics->setColWidth( 'Action', 28, 1 ); + $publics->setColWidth( 'Class', 28, 1 ); + $publics->setColWidth( 'Code', 14, 1 ); + for my $plain ( sort keys %{ $actions->{plain} } ) { my ( $class, $code ) = @{ $actions->{plain}->{$plain} }; $publics->addRow( "/$plain", $class, $code ); @@ -884,6 +897,9 @@ sub setup_components { if ( @{ $publics->{tbl_rows} } && $self->debug ); my $regexes = Text::ASCIITable->new; $regexes->setCols( 'Action', 'Class', 'Code' ); + $regexes->setColWidth( 'Action', 28, 1 ); + $regexes->setColWidth( 'Class', 28, 1 ); + $regexes->setColWidth( 'Code', 14, 1 ); for my $regex ( sort keys %{ $actions->{regex} } ) { my ( $class, $code ) = @{ $actions->{regex}->{$regex} }; $regexes->addRow( $regex, $class, $code );