X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FAction%2FREST.pm;h=f4e0a2fa759dc243f82d98d9d84a0d113a882f7d;hb=a4720cc5b7735b6f7f4f2839a8125d453d335380;hp=6a5ac82eb14a639ab2a33c069c7d510cbb1787da;hpb=7580fa2bd3b2410b86e5d0ef68d0b7f810911607;p=catagits%2FCatalyst-Action-Serialize-Data-Serializer.git diff --git a/lib/Catalyst/Action/REST.pm b/lib/Catalyst/Action/REST.pm index 6a5ac82..f4e0a2f 100644 --- a/lib/Catalyst/Action/REST.pm +++ b/lib/Catalyst/Action/REST.pm @@ -17,7 +17,8 @@ use Catalyst::Controller::REST; BEGIN { require 5.008001; } -our $VERSION = '0.74'; +our $VERSION = '0.76'; +$VERSION = eval $VERSION; sub new { my $class = shift; @@ -94,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;