X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FAction%2FREST.pm;h=f4e0a2fa759dc243f82d98d9d84a0d113a882f7d;hb=29739a599abe110c310ec26dc2b528f773bc579b;hp=dc3428987b774c2fc19cdbec666c40b75e74a547;hpb=a66af307b80b09a3ebc4dce79181eab581ca1fe5;p=catagits%2FCatalyst-Action-REST.git diff --git a/lib/Catalyst/Action/REST.pm b/lib/Catalyst/Action/REST.pm index dc34289..f4e0a2f 100644 --- a/lib/Catalyst/Action/REST.pm +++ b/lib/Catalyst/Action/REST.pm @@ -17,7 +17,7 @@ use Catalyst::Controller::REST; BEGIN { require 5.008001; } -our $VERSION = '0.75'; +our $VERSION = '0.76'; $VERSION = eval $VERSION; sub new { @@ -95,7 +95,10 @@ sub dispatch { my ($code, $name); # Common case, for foo_GET etc - if ($code = $controller->can($rest_method)) { + if ( $code = $controller->action_for($rest_method) ) { + $c->execute( $self->class, $self, @{ $c->req->args } ); + return $c->forward( $code, $c->req->args ); + } elsif ($code = $controller->can($rest_method)) { # Exceute normal action $c->execute( $self->class, $self, @{ $c->req->args } ); $name = $rest_method;