X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FDispatchType%2FRegex.pm;h=1ffa932da1d4887a2d8c806ed64627d8134eb917;hb=6303513fbf0488d0a4ee0c1964198d17879d9982;hp=d21eb757526196b747540467b27cf94ced40ce4e;hpb=0fc2d522eec43202c21e9f0062e43f10db4d9008;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/DispatchType/Regex.pm b/lib/Catalyst/DispatchType/Regex.pm index d21eb75..1ffa932 100644 --- a/lib/Catalyst/DispatchType/Regex.pm +++ b/lib/Catalyst/DispatchType/Regex.pm @@ -1,10 +1,10 @@ package Catalyst::DispatchType::Regex; -use Class::C3; use Moose; extends 'Catalyst::DispatchType::Path'; use Text::SimpleTable; +use Catalyst::Utils; use Text::Balanced (); has _compiled => ( @@ -36,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" ); @@ -150,10 +151,9 @@ sub uri_for_action { return undef; } -=head1 AUTHOR +=head1 AUTHORS -Matt S Trout -Sebastian Riedel, C +Catalyst Contributors, see Catalyst.pm =head1 COPYRIGHT