X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FDispatcher.pm;h=e8e201ea7f3c3b9d952ab6ccf2eb7e8d968b5bba;hp=2b812508b7559af73940b0d253ef857397ca49d2;hb=2eb2c42f2faef472cecd3788573d4872943334b6;hpb=63b6bc2ae4f28f60fb0a9f3f731a1f3f24cf18e2 diff --git a/lib/Catalyst/Dispatcher.pm b/lib/Catalyst/Dispatcher.pm index 2b81250..e8e201e 100644 --- a/lib/Catalyst/Dispatcher.pm +++ b/lib/Catalyst/Dispatcher.pm @@ -571,6 +571,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( @@ -624,6 +629,20 @@ sub _load_dispatch_types { return @loaded; } +# 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