X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FDispatchType%2FChained.pm;h=3b7502e95dceb08d61522d3d02be63d9b21ea3d7;hp=a27f6ba4e5b6589212076fff25bbae3f9a4117f6;hb=4fbc0e853c0b29d1f6082909b0cb54595ea32787;hpb=007a7ca0e2c93f24d55019aaedf27121f91b8cbc diff --git a/lib/Catalyst/DispatchType/Chained.pm b/lib/Catalyst/DispatchType/Chained.pm index a27f6ba..3b7502e 100644 --- a/lib/Catalyst/DispatchType/Chained.pm +++ b/lib/Catalyst/DispatchType/Chained.pm @@ -5,6 +5,7 @@ extends 'Catalyst::DispatchType'; use Text::SimpleTable; use Catalyst::ActionChain; +use Catalyst::Utils; use URI; has _endpoints => ( @@ -67,9 +68,10 @@ sub list { return unless $self->_endpoints; + my $column_width = Catalyst::Utils::term_width() - 35 - 9; my $paths = Text::SimpleTable->new( - [ 35, 'Path Spec' ], [ 36, 'Private' ] - ); + [ 35, 'Path Spec' ], [ $column_width, 'Private' ], + ); my $has_unattached_actions; my $unattached_actions = Text::SimpleTable->new( @@ -330,6 +332,14 @@ sub uri_for_action { } +=head2 $c->expand_action($action) + +Return a list of actions that represents a chained action. See +L for more info. You probably want to +use the expand_action it provides rather than this directly. + +=cut + sub expand_action { my ($self, $action) = @_;