From: John Napiorkowski Date: Tue, 5 Nov 2013 21:10:41 +0000 (-0600) Subject: make write_fh predicate private X-Git-Tag: 5.90050~1^2~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=a3c9ab76469287b1bd4dfdb5e48419d69ef997bc;hp=c2fef52fe310a9111756a2878500c6b11e7dbefb make write_fh predicate private --- diff --git a/Changes b/Changes index f7417d2..81e7ab5 100644 --- 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++) diff --git a/lib/Catalyst/Engine.pm b/lib/Catalyst/Engine.pm index ba606ba..b7c8cd3 100644 --- a/lib/Catalyst/Engine.pm +++ b/lib/Catalyst/Engine.pm @@ -68,7 +68,7 @@ See L and L 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'; diff --git a/lib/Catalyst/Response.pm b/lib/Catalyst/Response.pm index c44b23c..b57f84c 100644 --- a/lib/Catalyst/Response.pm +++ b/lib/Catalyst/Response.pm @@ -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 }