X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FAction%2FDeserialize.pm;h=342b47850951a3fe9f4628824ba6b8f02960e986;hb=96a61a601b093754a99bb61b57e41dbfc3228ad7;hp=ed584c69dcb00cdb6eac201afe6a4fe13de6962a;hpb=faf5c20bff09c91f18b46a3d3d8349379aa36192;p=catagits%2FCatalyst-Action-REST.git diff --git a/lib/Catalyst/Action/Deserialize.pm b/lib/Catalyst/Action/Deserialize.pm index ed584c6..342b478 100644 --- a/lib/Catalyst/Action/Deserialize.pm +++ b/lib/Catalyst/Action/Deserialize.pm @@ -1,24 +1,22 @@ -# -# Catlyst::Action::Deserialize -# Created by: Adam Jacob, Marchex, -# -# $Id$ - package Catalyst::Action::Deserialize; -use strict; -use warnings; +use Moose; +use namespace::autoclean; -use base 'Catalyst::Action::SerializeBase'; +extends 'Catalyst::Action::SerializeBase'; use Module::Pluggable::Object; +use MRO::Compat; + +our $VERSION = '0.84'; +$VERSION = eval $VERSION; -__PACKAGE__->mk_accessors(qw(plugins)); +has plugins => ( is => 'rw' ); sub execute { my $self = shift; my ( $controller, $c ) = @_; - my @demethods = qw(POST PUT OPTIONS); + my @demethods = qw(POST PUT OPTIONS DELETE); my $method = $c->request->method; if ( grep /^$method$/, @demethods ) { my ( $sclass, $sarg, $content_type ) = @@ -38,11 +36,13 @@ sub execute { } } - $self->NEXT::execute(@_); + $self->maybe::next::method(@_); return 1; } +__PACKAGE__->meta->make_immutable; + =head1 NAME Catalyst::Action::Deserialize - Deserialize Data in a Request @@ -94,16 +94,12 @@ a sensible set of defaults for a controller doing REST. L, L -=head1 AUTHOR +=head1 AUTHORS -Adam Jacob , with lots of help from mst and jrockway - -Marchex, Inc. paid me while I developed this module. (http://www.marchex.com) +See L for authors. =head1 LICENSE You may distribute this code under the same terms as Perl itself. =cut - -1;