Committing switch from NEXT to MRO::Compat.
[catagits/Catalyst-Action-Serialize-Data-Serializer.git] / lib / Catalyst / Controller / REST.pm
index d0c43b0..737cb13 100644 (file)
@@ -1,6 +1,6 @@
 package Catalyst::Controller::REST;
 
-our $VERSION = '0.67';
+our $VERSION = '0.71';
 
 =head1 NAME
 
@@ -217,7 +217,6 @@ use Params::Validate qw(SCALAR OBJECT);
 __PACKAGE__->mk_accessors(qw(serialize));
 
 __PACKAGE__->config(
-    'default_view' => 'REST',
     'stash_key' => 'rest',
     'map'       => {
         'text/html'          => 'YAML::HTML',
@@ -237,6 +236,8 @@ __PACKAGE__->config(
 
 sub begin : ActionClass('Deserialize') { }
 
+sub end : ActionClass('Serialize') { }
+
 =item status_ok
 
 Returns a "200 OK" response.  Takes an "entity" to serialize.
@@ -441,22 +442,22 @@ L<Catalyst::Action::Serialize>.
 The C<begin> method uses L<Catalyst::Action::Deserialize>.  The C<end>
 method uses L<Catalyst::Action::Serialize>.  If you want to override
 either behavior, simply implement your own C<begin> and C<end> actions
-and use NEXT:
+and use MRO::Compat:
 
   my Foo::Controller::Monkey;
   use base qw(Catalyst::Controller::REST);
 
   sub begin :Private {
     my ($self, $c) = @_;
-    ... do things before Deserializing ...
-    $self->NEXT::begin($c); 
+    ... do things before Deserializing ...    
+    $self->maybe::next::method($c);    
     ... do things after Deserializing ...
   } 
 
   sub end :Private {
     my ($self, $c) = @_;
-    ... do things before Serializing ...
-    $self->NEXT::end($c); 
+    ... do things before Serializing ...    
+    $self->maybe::next::method($c);
     ... do things after Serializing ...
   }