package Catalyst::Controller::REST;
-our $VERSION = '0.68';
+our $VERSION = '0.71';
=head1 NAME
__PACKAGE__->mk_accessors(qw(serialize));
__PACKAGE__->config(
- 'default_view' => 'REST',
'stash_key' => 'rest',
'map' => {
'text/html' => 'YAML::HTML',
sub begin : ActionClass('Deserialize') { }
+sub end : ActionClass('Serialize') { }
+
=item status_ok
Returns a "200 OK" response. Takes an "entity" to 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 ...
}