make write_fh predicate private
John Napiorkowski [Tue, 5 Nov 2013 21:10:41 +0000 (15:10 -0600)]
Changes
lib/Catalyst/Engine.pm
lib/Catalyst/Response.pm

diff --git a/Changes b/Changes
index f7417d2..81e7ab5 100644 (file)
--- a/Changes
+++ b/Changes
@@ -5,6 +5,11 @@ TBA
     method was never documented and is new so this should not be scary.  If you
     were using $request->has_io_fh, change to ->_has_io_fh (but please consider
     a different way to do what you are doing...)
+  - make predicate on ->write_fh private.  Potentially breaking change, but this 
+    method was never documented and is new so this should not be scary.  If you
+    were using $response->has_write_fh, change to ->_has_write_fh (but please consider
+    a different way to do what you are doing...)
+
 
 5.90049_006 - 2013-11-04
   - Fixed case where test could fail when Starman was partly installed (n0body++)
index ba606ba..b7c8cd3 100644 (file)
@@ -68,7 +68,7 @@ See L<Catalyst::Response\write> and L<Catalyst::Response\write_fh> for more.
 
 sub finalize_body {
     my ( $self, $c ) = @_;
-    return if $c->response->has_write_fh;
+    return if $c->response->_has_write_fh;
 
     my $body = $c->response->body;
     no warnings 'uninitialized';
index c44b23c..b57f84c 100644 (file)
@@ -28,7 +28,7 @@ has _writer => (
 
 has write_fh => (
   is=>'ro',
-  predicate=>'has_write_fh',
+  predicate=>'_has_write_fh',
   lazy=>1,
   builder=>'_build_write_fh',
 );
@@ -42,7 +42,7 @@ sub _build_write_fh {
 
 sub DEMOLISH {
   my $self = shift;
-  return if $self->has_write_fh;
+  return if $self->_has_write_fh;
   if($self->_has_writer) {
     $self->_writer->close
   }