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=4c6bf4c66dbe731b7ccd8e2e2803ffa5efcacb4f;hp=d21eb757526196b747540467b27cf94ced40ce4e;hb=26dc649ad1a74622697f25fcbf29e806e75fcd2f;hpb=0fc2d522eec43202c21e9f0062e43f10db4d9008 diff --git a/lib/Catalyst/DispatchType/Regex.pm b/lib/Catalyst/DispatchType/Regex.pm index d21eb75..4c6bf4c 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 => ( @@ -22,10 +22,21 @@ Catalyst::DispatchType::Regex - Regex DispatchType =head1 SYNOPSIS -See L. +See L. =head1 DESCRIPTION +Dispatch type managing path-matching behaviour using regexes. For +more information on dispatch types, see: + +=over 4 + +=item * L for how they affect website authors + +=item * L for implementation information. + +=back + =head1 METHODS =head2 $self->list($c) @@ -36,7 +47,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 +162,9 @@ sub uri_for_action { return undef; } -=head1 AUTHOR +=head1 AUTHORS -Matt S Trout -Sebastian Riedel, C +Catalyst Contributors, see Catalyst.pm =head1 COPYRIGHT