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=31613c0f963615da5bda4c3372a197565cef0a57;hpb=69ad525ba10320a816563ccee5cb88373e383f22;p=catagits%2FCatalyst-Action-REST.git diff --git a/lib/Catalyst/Action/REST.pm b/lib/Catalyst/Action/REST.pm index 31613c0..f4e0a2f 100644 --- a/lib/Catalyst/Action/REST.pm +++ b/lib/Catalyst/Action/REST.pm @@ -12,19 +12,19 @@ use warnings; use base 'Catalyst::Action'; use Class::Inspector; -use Catalyst; use Catalyst::Request::REST; use Catalyst::Controller::REST; BEGIN { require 5.008001; } -our $VERSION = '0.73'; +our $VERSION = '0.76'; +$VERSION = eval $VERSION; sub new { my $class = shift; my $config = shift; Catalyst::Request::REST->_insert_self_into( $config->{class} ); - return $class->SUPER::new($config, @_); + return $class->next::method($config, @_); } =head1 NAME @@ -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; @@ -185,10 +188,6 @@ for this to run smoothly. =back -=head1 MAINTAINER - -J. Shirley - =head1 CONTRIBUTORS Christopher Laco @@ -199,11 +198,17 @@ John Goulah Daisuke Maki +J. Shirley + +Hans Dieter Pearcey + +Tomas Doran (t0m) + =head1 AUTHOR Adam Jacob , with lots of help from mst and jrockway -Marchex, Inc. paid me while I developed this module. (http://www.marchex.com) +Marchex, Inc. paid me while I developed this module. (L) =head1 LICENSE