From: John Napiorkowski Date: Fri, 17 Apr 2015 17:43:28 +0000 (-0500) Subject: since _context is a weak ref it can go out of scope before all the errors are finishe... X-Git-Tag: 5.90089_002~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=ca6d4ff660abd0bc8cd2e6590a5d8c76a5cae64a since _context is a weak ref it can go out of scope before all the errors are finished, wehn in debug mode --- diff --git a/lib/Catalyst/Response.pm b/lib/Catalyst/Response.pm index 74d59fe..eb99ab7 100644 --- a/lib/Catalyst/Response.pm +++ b/lib/Catalyst/Response.pm @@ -109,7 +109,7 @@ before [qw(status headers content_encoding content_length content_type header)] $self->_context->log->warn( "Useless setting a header value after finalize_headers and the response callback has been called." . " Not what you want." ) - if ( $self->finalized_headers && !$self->_has_response_cb && @_ ); + if ( $self->_context && $self->finalized_headers && !$self->_has_response_cb && @_ ); }; sub output { shift->body(@_) }