3 # Created by: Adam Jacob, Marchex, <adam@hjksolutions.com>
4 # Created on: 10/13/2006 03:54:33 PM PDT
8 package Catalyst::Request::REST;
14 extends qw/Catalyst::Request/;
15 with qw/Catalyst::RequestRole::REST Catalyst::RequestRole::Deserialize/;
19 sub _insert_self_into {
20 my ($class, $app_class ) = @_;
21 # the fallback to $app_class is for the (rare and deprecated) case when
22 # people are defining actions in MyApp.pm instead of in a controller.
23 my $app = Catalyst::Utils::class2appclass( $app_class ) || $app_class;
25 my $req_class = $app->request_class;
26 return if $req_class->isa($class);
27 if ($req_class eq 'Catalyst::Request') {
28 $app->request_class($class);
30 die "$app has a custom request class $req_class, "
31 . "which is not a $class; see Catalyst::Request::REST";
37 Catalyst::Request::REST - A REST-y subclass of Catalyst::Request
41 Adam Jacob <adam@stalecoffee.org>, with lots of help from mst and jrockway
45 J. Shirley <jshirley@cpan.org>
49 You may distribute this code under the same terms as Perl itself.