X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FAction%2FREST.pm;h=d27be7ddccc4b03625787e674d803503f6833032;hb=d3f3a2ed11595db3f5d10e8ae395a04209670356;hp=4a607b0baa10a35967116eae60def5e3f18fcb10;hpb=5f749844ef9839e412a0c3e37ec7d3da007bc70a;p=catagits%2FCatalyst-Action-REST.git diff --git a/lib/Catalyst/Action/REST.pm b/lib/Catalyst/Action/REST.pm index 4a607b0..d27be7d 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.79'; +$VERSION = eval $VERSION; sub new { my $class = shift; @@ -40,15 +41,18 @@ Catalyst::Action::REST - Automated REST Method Dispatching ... do something for GET requests ... } - sub foo_PUT { - ... do somethign for PUT requests ... + # alternatively use an Action + sub foo_PUT : Action { + ... do something for PUT requests ... } =head1 DESCRIPTION This Action handles doing automatic method dispatching for REST requests. It takes a normal Catalyst action, and changes the dispatch to append an -underscore and method name. +underscore and method name. First it will try dispatching to an action with +the generated name, and failing that it will try to dispatch to a regular +method. For example, in the synopsis above, calling GET on "/foo" would result in the foo_GET method being dispatched. @@ -187,8 +191,16 @@ for this to run smoothly. =back +=head1 AUTHOR + +Adam Jacob , 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 @@ -203,11 +215,9 @@ Hans Dieter Pearcey Tomas Doran (t0m) -=head1 AUTHOR +=head1 COPYRIGHT -Adam Jacob , with lots of help from mst and jrockway - -Marchex, Inc. paid me while I developed this module. (L) +Copyright the above named AUTHOR and CONTRIBUTORS =head1 LICENSE