# Remember to update this in Catalyst::Runtime as well!
-our $VERSION = '5.7011';
+our $VERSION = '5.7012';
sub import {
my ( $class, @arguments ) = @_;
# forward, locate the caller
if ( my $parent = $c->stack->[-1] ) {
- $c->stats->profile(begin => $action,
- parent => "$parent" . $c->counter->{"$parent"},
- uid => $uid);
+ $c->stats->profile(
+ begin => $action,
+ parent => "$parent" . $c->counter->{"$parent"},
+ uid => $uid,
+ );
}
else {
# forward with no caller may come from a plugin
- $c->stats->profile(begin => $action,
- uid => $uid);
+ $c->stats->profile(
+ begin => $action,
+ uid => $uid,
+ );
}
}
else {
# root-level call
- $c->stats->profile(begin => $action,
- uid => $uid);
+ $c->stats->profile(
+ begin => $action,
+ uid => $uid,
+ );
}
return $action;
sub _stats_finish_execute {
my ( $c, $info ) = @_;
- $c->stats->profile(end => $info);
+ $c->stats->profile( end => $info );
}
=head2 $c->_localize_fields( sub { }, \%keys );
$c->log->error($error);
}
+ # utf8-encode the body (convert perl chars to utf8 on the wire)
+ if ( $c->response->{body} && utf8::is_utf8($c->response->{body}) ){
+ utf8::encode( $c->response->{body} );
+ }
+
# Allow engine to handle finalize flow (for POE)
if ( $c->engine->can('finalize') ) {
$c->engine->finalize($c);
}
}
else {
+ # everything should be bytes at this point, but just in case
$c->response->content_length( bytes::length( $c->response->body ) );
}
}