remove hardcoded version strings
[catagits/Catalyst-Action-REST.git] / lib / Catalyst / Action / Serialize.pm
index 73855b3..82ecb42 100644 (file)
@@ -7,8 +7,7 @@ extends 'Catalyst::Action::SerializeBase';
 use Module::Pluggable::Object;
 use MRO::Compat;
 
-our $VERSION = '1.02';
-$VERSION = eval $VERSION;
+# VERSION
 
 has _encoders => (
    is => 'ro',
@@ -26,6 +25,8 @@ sub execute {
     return 1 if $c->response->has_body;
     return 1 if scalar @{ $c->error };
     return 1 if $c->response->status =~ /^(?:204)$/;
+    return 1 if defined $c->stash->{current_view};
+    return 1 if defined $c->stash->{current_view_instance};
 
     my ( $sclass, $sarg, $content_type ) =
       $self->_load_content_plugins( "Catalyst::Action::Serialize",