Bump version requirement for MX::Emulate::CAF to the new release which fixes the...
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Engine / CGI.pm
index ae5a652..2fcc8f8 100644 (file)
@@ -200,8 +200,9 @@ Enable autoflush on the output handle for CGI-based engines.
 
 =cut
 
-before prepare_write => sub {
+around prepare_write => sub {
     *STDOUT->autoflush(1);
+    return shift->(@_);
 };
 
 =head2 $self->write($c, $buffer)
@@ -252,5 +253,6 @@ This program is free software, you can redistribute it and/or modify it under
 the same terms as Perl itself.
 
 =cut
+no Moose;
 
 1;