X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FEngine.pm;h=3a73c04fa2a7b8df2308410139be1c67ccba188f;hb=488736aa8f612ac5f963a9c9f4794286525a335a;hp=ce90738e81671ec7bf3debb8e5c8d42722aaf376;hpb=2832cb5d6e0c019910584d076ee6633afaeecfe1;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Engine.pm b/lib/Catalyst/Engine.pm index ce90738..3a73c04 100644 --- a/lib/Catalyst/Engine.pm +++ b/lib/Catalyst/Engine.pm @@ -41,7 +41,8 @@ Finalize body. Prints the response output. sub finalize_body { my ( $self, $c ) = @_; my $body = $c->response->body; - if ( ref $body && ( $body->can('read') || ref($body) eq 'GLOB' ) ) { + no warnings 'uninitialized'; + if ( Scalar::Util::blessed($body) && $body->can('read') or ref($body) eq 'GLOB' ) { while ( !eof $body ) { read $body, my ($buffer), $CHUNKSIZE; last unless $self->write( $c, $buffer );