X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FDispatchType%2FRegex.pm;h=1ffa932da1d4887a2d8c806ed64627d8134eb917;hp=4d8d28abd5cd606ad3b8ccfac056322279c02e18;hb=39fc2ce1e456c4e2a272204aa8fe67896984b3a6;hpb=e358ade7c046b92ae117b0b242ac1a24e22b0d92 diff --git a/lib/Catalyst/DispatchType/Regex.pm b/lib/Catalyst/DispatchType/Regex.pm index 4d8d28a..1ffa932 100644 --- a/lib/Catalyst/DispatchType/Regex.pm +++ b/lib/Catalyst/DispatchType/Regex.pm @@ -4,6 +4,7 @@ use Moose; extends 'Catalyst::DispatchType::Path'; use Text::SimpleTable; +use Catalyst::Utils; use Text::Balanced (); has _compiled => ( @@ -35,7 +36,8 @@ Output a table of all regex actions, and their private equivalent. sub list { my ( $self, $c ) = @_; - my $re = Text::SimpleTable->new( [ 35, 'Regex' ], [ 36, 'Private' ] ); + my $column_width = Catalyst::Utils::term_width() - 35 - 9; + my $re = Text::SimpleTable->new( [ 35, 'Regex' ], [ $column_width, 'Private' ] ); for my $regex ( @{ $self->_compiled } ) { my $action = $regex->{action}; $re->row( $regex->{path}, "/$action" );