From: Tomas Doran Date: Sat, 21 Mar 2009 14:08:25 +0000 (+0000) Subject: Merge up ashs r9505 from 5.70 X-Git-Tag: 5.80001~61 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=7033c56c02869e4c4950f4861c7ae3cf118b42c1;hp=7e5c67f2407bba8afe4ded84f69aa6ff7ed7e4b2 Merge up ashs r9505 from 5.70 --- diff --git a/lib/Catalyst/Dispatcher.pm b/lib/Catalyst/Dispatcher.pm index 08652e5..e5b3d22 100644 --- a/lib/Catalyst/Dispatcher.pm +++ b/lib/Catalyst/Dispatcher.pm @@ -582,6 +582,11 @@ sub setup_actions { $self->_load_dispatch_types( @{ $self->postload_dispatch_types } ); return unless $c->debug; + $self->_display_action_tables($c); +} + +sub _display_action_tables { + my ($self, $c) = @_; my $column_width = Catalyst::Utils::term_width() - 20 - 36 - 12; my $privates = Text::SimpleTable->new( @@ -682,6 +687,20 @@ __PACKAGE__->meta->make_immutable; Provided by Moose +# Dont document this until someone else is happy with beaviour. Ash 2009/03/16 +sub dispatch_type { + my ($self, $name) = @_; + + unless ($name =~ s/^\+//) { + $name = "Catalyst::DispatchType::" . $name; + } + + for (@{ $self->dispatch_types }) { + return $_ if ref($_) eq $name; + } + return undef; +} + =head1 AUTHORS Catalyst Contributors, see Catalyst.pm diff --git a/t/aggregate/live_recursion.t b/t/aggregate/live_recursion.t index a2fcea8..56a00a8 100644 --- a/t/aggregate/live_recursion.t +++ b/t/aggregate/live_recursion.t @@ -23,3 +23,4 @@ SKIP: ok( !$response->is_success, 'Response Not Successful' ); is( $response->header('X-Catalyst-Error'), 'Deep recursion detected calling "/recursion_test"', 'Deep Recursion Detected' ); } + diff --git a/t/lib/TestApp/Controller/Root.pm b/t/lib/TestApp/Controller/Root.pm index 53d79e2..a3978d6 100644 --- a/t/lib/TestApp/Controller/Root.pm +++ b/t/lib/TestApp/Controller/Root.pm @@ -20,4 +20,8 @@ sub localregex : LocalRegex('^localregex$') { $c->forward('TestApp::View::Dump::Request'); } +sub chain_to_self : Chained('chain_to_self') PathPart('') CaptureArgs(1) { } + +sub chain_recurse_endoint : Chained('chain_to_self') Args(0) { } + 1;