Text::SimpleTable's now go as wide as $ENV{COLUMNS}
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Dispatcher.pm
index d5bb455..b0b3606 100644 (file)
@@ -10,6 +10,7 @@ use Catalyst::Action;
 use Catalyst::ActionContainer;
 use Catalyst::DispatchType::Default;
 use Catalyst::DispatchType::Index;
+use Catalyst::Utils;
 use Text::SimpleTable;
 use Tree::Simple;
 use Tree::Simple::Visitor::FindByPath;
@@ -251,10 +252,8 @@ sub _do_forward {
 
     no warnings 'recursion';
 
-    my $orig_args = $c->request->arguments();
-    $c->request->arguments($args);
+    local $c->request->{arguments} = $args;
     $action->dispatch( $c );
-    $c->request->arguments($orig_args);
 
     return $c->state;
 }
@@ -585,10 +584,9 @@ sub setup_actions {
 
     return unless $c->debug;
 
+    my $column_width = Catalyst::Utils::term_width() - 20 - 36 - 12;
     my $privates = Text::SimpleTable->new(
-        [ 20, 'Private' ],
-        [ 36, 'Class' ],
-        [ 12, 'Method' ]
+        [ 20, 'Private' ], [ 36, 'Class' ], [ $column_width, 'Method' ]
     );
 
     my $has_private = 0;