DispatchTypes' POD refers to Catalyst::Manual::Intro, nominated as the best location...
[catagits/Catalyst-Runtime.git] / lib / Catalyst / DispatchType / Regex.pm
index 4d8d28a..4c6bf4c 100644 (file)
@@ -4,6 +4,7 @@ use Moose;
 extends 'Catalyst::DispatchType::Path';
 
 use Text::SimpleTable;
+use Catalyst::Utils;
 use Text::Balanced ();
 
 has _compiled => (
@@ -21,10 +22,21 @@ Catalyst::DispatchType::Regex - Regex DispatchType
 
 =head1 SYNOPSIS
 
-See L<Catalyst>.
+See L<Catalyst::DispatchType>.
 
 =head1 DESCRIPTION
 
+Dispatch type managing path-matching behaviour using regexes.  For
+more information on dispatch types, see:
+
+=over 4
+
+=item * L<Catalyst::Manual::Intro> for how they affect website authors
+
+=item * L<Catalyst::DispatchType> for implementation information.
+
+=back
+
 =head1 METHODS
 
 =head2 $self->list($c)
@@ -35,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" );