package Catalyst::Request::REST;
-
use Moose;
-use namespace::autoclean;
-use Scalar::Util qw/blessed/;
-
-extends qw/Catalyst::Request Class::Accessor::Fast/;
use Catalyst::Utils;
use HTTP::Headers::Util qw(split_header_words);
+use namespace::autoclean;
+
+extends 'Catalyst::Request';
+
+has [qw/ data accept_only /] => ( is => 'rw' );
+
sub _insert_self_into {
my ($class, $app_class ) = @_;
# the fallback to $app_class is for the (rare and deprecated) case when
}
}
-__PACKAGE__->mk_accessors(qw(data accept_only));
-
sub accepted_content_types {
my $self = shift;
return grep { $_ eq $type } @{ $self->accepted_content_types };
}
+__PACKAGE__->meta->make_immutable;
+__END__
+
=head1 NAME
Catalyst::Request::REST - A REST-y subclass of Catalyst::Request
You may distribute this code under the same terms as Perl itself.
=cut
-
-1;