Permalink
Browse files

Debugスクリーンをprocessのあとでやっていて、finalizeのあとにbodyをセットするということになっていたので、そのぶぶん…

…を after 'dispatch' に移動
  • Loading branch information...
1 parent 2672624 commit 513b9886137b232072ed100efb641e32f996046e @typester committed Jun 27, 2012
Showing with 7 additions and 3 deletions.
  1. +7 −3 lib/Ark/Context/Debug.pm
View
@@ -170,14 +170,18 @@ around process => sub {
$self->log( debug =>
"Request took ${elapsed}s (${av}/s)\n%s", $self->debug_report->draw);
+ $res;
+};
+
+after dispatch => sub {
+ my ($self) = @_;
+
if (my @error = @{ $self->error }) {
$self->ensure_class_loaded('Text::MicroTemplate');
$self->res->status(500);
- $self->res->body( $self->debug_screen_tamplate->($self)->as_string );
+ $self->res->body( my $body = $self->debug_screen_tamplate->($self)->as_string );
}
-
- $res;
};
after prepare_action => sub {

0 comments on commit 513b988

Please sign in to comment.