X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FAction%2FREST.pm;h=10d7c32f2dbf1aba6fc5e6ee7a96942cc178a1db;hb=e527bba30dcea5108b0fb77416fcb4e8ee1e5a38;hp=c4f42b7100f2aba5763ce9543c20ea2dd66c346c;hpb=76a96edc1fbc9c7df0842bce0bdb1857fe6c35d5;p=catagits%2FCatalyst-Action-REST.git diff --git a/lib/Catalyst/Action/REST.pm b/lib/Catalyst/Action/REST.pm index c4f42b7..10d7c32 100644 --- a/lib/Catalyst/Action/REST.pm +++ b/lib/Catalyst/Action/REST.pm @@ -10,7 +10,7 @@ use Catalyst::Controller::REST; BEGIN { require 5.008001; } -our $VERSION = '0.81'; +our $VERSION = '0.87'; $VERSION = eval $VERSION; sub new { @@ -92,12 +92,13 @@ sub dispatch { # Common case, for foo_GET etc 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)) { + $c->execute( $self->class, $self, @{ $c->req->args } ); # Execute normal 'foo' action. + return $c->forward( $code, $c->req->args ); # Forward to foo_GET if it's an action + } + elsif ($code = $controller->can($rest_method)) { # Exceute normal action $c->execute( $self->class, $self, @{ $c->req->args } ); - $name = $rest_method; + $name = $rest_method; # Stash name and code to run 'foo_GET' like an action below. } # Generic handling for foo_OPTIONS @@ -185,29 +186,29 @@ for this to run smoothly. =head1 AUTHOR -Adam Jacob , with lots of help from mst and jrockway +Adam Jacob Eadam@stalecoffee.orgE, with lots of help from mst and jrockway Marchex, Inc. paid me while I developed this module. (L) =head1 CONTRIBUTORS -Arthur Axel "fREW" Schmidt - -Christopher Laco - -Luke Saunders +Tomas Doran (t0m) Ebobtfish@bobtfish.netE John Goulah -Daisuke Maki +Christopher Laco -J. Shirley +Daisuke Maki Edaisuke@endeworks.jpE Hans Dieter Pearcey -Tomas Doran (t0m) +Dave Rolsky Eautarch@urth.orgE + +Luke Saunders + +Arthur Axel "fREW" Schmidt Efrioux@gmail.comE -Dave Rolsky +J. Shirley Ejshirley@gmail.comE =head1 COPYRIGHT