X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FDispatcher.pm;h=7bad0f6f5f97ed6e248428624056f5318e335791;hb=a9cbd748a5bef5badba4a3f012e5df75cccd60ca;hp=e143b001bfca4470f705dd74e12faa0167a75d42;hpb=78d760bb64c2142042834b11911b728259e3005d;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Dispatcher.pm b/lib/Catalyst/Dispatcher.pm index e143b00..7bad0f6 100644 --- a/lib/Catalyst/Dispatcher.pm +++ b/lib/Catalyst/Dispatcher.pm @@ -229,7 +229,7 @@ sub prepare_action { # this level foreach my $type ( @{ $self->dispatch_types } ) { - last DESCEND if $type->prepare_action( $c, $path ); + last DESCEND if $type->match( $c, $path ); } # If not, move the last part path to args @@ -382,7 +382,7 @@ sub set_action { # Pass the action to our dispatch types so they can register it if reqd. foreach my $type ( @{ $self->dispatch_types } ) { - $type->register_action( $c, $action ); + $type->register( $c, $action ); } } @@ -474,34 +474,11 @@ sub setup_actions { }; $walker->( $walker, $self->tree, '' ); - $class->log->debug( "Loaded private actions:\n" . $privates->draw ) + $class->log->debug( "Loaded Private actions:\n" . $privates->draw ) if ( @{ $privates->{tbl_rows} } ); - my $publics = Text::ASCIITable->new; - $publics->setCols( 'Public', 'Private' ); - $publics->setColWidth( 'Public', 36, 1 ); - $publics->setColWidth( 'Private', 37, 1 ); - - for my $plain ( sort keys %{ $actions->{plain} } ) { - my $action = $actions->{plain}->{$plain}; - $publics->addRow( "/$plain", "/$action" ); - } - - $class->log->debug( "Loaded public actions:\n" . $publics->draw ) - if ( @{ $publics->{tbl_rows} } ); - - my $regexes = Text::ASCIITable->new; - $regexes->setCols( 'Regex', 'Private' ); - $regexes->setColWidth( 'Regex', 36, 1 ); - $regexes->setColWidth( 'Private', 37, 1 ); - - for my $regex ( sort keys %{ $actions->{regex} } ) { - my $action = $actions->{regex}->{$regex}; - $regexes->addRow( $regex, "/$action" ); - } - - $class->log->debug( "Loaded regex actions:\n" . $regexes->draw ) - if ( @{ $regexes->{tbl_rows} } ); + # List all public actions + $_->list($class) for @{ $self->dispatch_types }; } =back