Adding documentation, and a 202 Accepted status helper
[catagits/Catalyst-Action-Serialize-Data-Serializer.git] / lib / Catalyst / Action / REST.pm
index 5c0d112..9adb921 100644 (file)
@@ -46,6 +46,8 @@ If a method is requested that is not implemented, this action will
 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
@@ -57,15 +59,16 @@ mechanism described above.
 
 =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} );
     }
 }
 
@@ -105,6 +108,8 @@ L<Catalyst::Action::Serialize>, L<Catalyst::Action::Deserialize>
 
 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.