sub dispatch {
my ( $self, $c ) = @_;
if ( $c->action ) {
-use Data::Dumper; warn Dumper( $c->action, $c->action->namespace );
$c->forward( join( '/', '', $c->action->namespace, '_DISPATCH' ) );
}
return $action, \@args;
}
-=head2 $self->go( $c, $command [, \@arguments ] )
-
-Documented in L<Catalyst>
-
-=cut
-
-sub go {
- my $self = shift;
- my ( $c, $command ) = @_;
- my ( $action, $args ) = $self->_command2action(@_);
-
- unless ($action) {
- my $error =
- qq/Couldn't go to command "$command": /
- . qq/Invalid action or component./;
- $c->error($error);
- $c->log->debug($error) if $c->debug;
- return 0;
- }
-
- local $c->request->{arguments} = $args;
- $c->namespace($action->namespace);
- $c->action($action);
- $self->dispatch($c);
-
- die $Catalyst::GO;
-}
-
=head2 $self->forward( $c, $command [, \@arguments ] )
Documented in L<Catalyst>