[Catalyst-commits] r12571 -
Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst
rafl at dev.catalyst.perl.org
rafl at dev.catalyst.perl.org
Sat Jan 9 18:12:51 GMT 2010
Author: rafl
Date: 2010-01-09 18:12:51 +0000 (Sat, 09 Jan 2010)
New Revision: 12571
Modified:
Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Engine.pm
Log:
Clear up the response callback and the writer object after each request.
Modified: Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Engine.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Engine.pm 2010-01-09 18:01:25 UTC (rev 12570)
+++ Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Engine.pm 2010-01-09 18:12:51 UTC (rev 12571)
@@ -23,15 +23,17 @@
has _prepared_write => (is => 'rw');
has _response_cb => (
- is => 'ro',
- isa => 'CodeRef',
- writer => '_set_response_cb',
+ is => 'ro',
+ isa => 'CodeRef',
+ writer => '_set_response_cb',
+ clearer => '_clear_response_cb',
);
has _writer => (
- is => 'ro',
- isa => duck_type([qw(write close)]),
- writer => '_set_writer',
+ is => 'ro',
+ isa => duck_type([qw(write close)]),
+ writer => '_set_writer',
+ clearer => '_clear_writer',
);
# Amount of data to read from input on each pass
@@ -74,7 +76,7 @@
}
$self->_writer->close;
-
+ $self->_clear_writer;
$self->_clear_env;
return;
@@ -319,6 +321,7 @@
$ctx->response->headers->scan(sub { push @headers, @_ });
$self->_set_writer($self->_response_cb->([ $ctx->response->status, \@headers ]));
+ $self->_clear_response_cb;
return;
}
More information about the Catalyst-commits
mailing list