X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FController%2FREST.pm;h=090284ee2110937da0cf145ae4dd307b44726d78;hb=355d4385698315db0f6f1e253836292fecd3b05b;hp=2c0cb17f316faa978ac75fb3d452ee36d840286e;hpb=838f49dc89f8bef88c3a3dc9841473555f71bb82;p=catagits%2FCatalyst-Action-REST.git diff --git a/lib/Catalyst/Controller/REST.pm b/lib/Catalyst/Controller/REST.pm index 2c0cb17..090284e 100644 --- a/lib/Catalyst/Controller/REST.pm +++ b/lib/Catalyst/Controller/REST.pm @@ -2,7 +2,7 @@ package Catalyst::Controller::REST; use Moose; use namespace::autoclean; -our $VERSION = '0.85'; +our $VERSION = '0.87'; $VERSION = eval $VERSION; =head1 NAME @@ -565,28 +565,33 @@ L. The C method uses L. The C method uses L. If you want to override either behavior, simply implement your own C and C actions -and use MRO::Compat: +and forward to another action with the Serialize and/or Deserialize +action classes: package Foo::Controller::Monkey; use Moose; use namespace::autoclean; - + BEGIN { extends 'Catalyst::Controller::REST' } - sub begin :Private { + sub begin : Private { my ($self, $c) = @_; ... do things before Deserializing ... - $self->maybe::next::method($c); + $c->forward('deserialize'); ... do things after Deserializing ... } + sub deserialize : ActionClass('Deserialize') {} + sub end :Private { my ($self, $c) = @_; ... do things before Serializing ... - $self->maybe::next::method($c); + $c->forward('serialize'); ... do things after Serializing ... } + sub serialize : ActionClass('Serialize') {} + =back =head1 A MILD WARNING