return a status 405 (Method Not Found). It will populate the "Allow" header
with the list of implemented request methods.
+It is likely that you really want to look at L<Catalyst::Controller::REST>.
+
=head1 METHODS
=over 4
=cut
sub dispatch {
- my ( $self, $c ) = @_;
+ my $self = shift;
+ my $c = shift;
my $controller = $self->class;
my $method = $self->name . "_" . uc( $c->request->method );
if ( $controller->can($method) ) {
- return $controller->$method($c);
+ return $controller->$method($c, @{$c->req->args});
} else {
$self->_return_405($c);
- return $c->execute( $self->class, $self );
+ return $c->execute( $self->class, $self, @{$c->req->args} );
}
}
Adam Jacob <adam@stalecoffee.org>, with lots of help from mst and jrockway
+Marchex, Inc. paid me while I developed this module. (http://www.marchex.com)
+
=head1 LICENSE
You may distribute this code under the same terms as Perl itself.