X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FEngine.pm;h=1fdbaad44755ce4f0cf257d4042ac72f205984f5;hb=a50e5b463c6cc4044b7d39a157d54db64212ef51;hp=de287ea65602bfd53f84007f3c4e853681dd93d6;hpb=10011c19cb6f294d1d16c1a1fb484614a7c5dcba;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Engine.pm b/lib/Catalyst/Engine.pm index de287ea..1fdbaad 100644 --- a/lib/Catalyst/Engine.pm +++ b/lib/Catalyst/Engine.pm @@ -10,7 +10,10 @@ use HTML::Entities; use HTTP::Body; use HTTP::Headers; use URI::QueryParam; -use Scalar::Util (); + +use namespace::clean -except => 'meta'; + +has env => (is => 'rw'); # input position and length has read_length => (is => 'rw'); @@ -18,8 +21,6 @@ has read_position => (is => 'rw'); has _prepared_write => (is => 'rw'); -no Moose; - # Amount of data to read from input on each pass our $CHUNKSIZE = 64 * 1024; @@ -46,7 +47,7 @@ sub finalize_body { my ( $self, $c ) = @_; my $body = $c->response->body; no warnings 'uninitialized'; - if ( Scalar::Util::blessed($body) && $body->can('read') or ref($body) eq 'GLOB' ) { + if ( blessed($body) && $body->can('read') or ref($body) eq 'GLOB' ) { while ( !eof $body ) { read $body, my ($buffer), $CHUNKSIZE; last unless $self->write( $c, $buffer ); @@ -76,7 +77,7 @@ sub finalize_cookies { my $val = $response->cookies->{$name}; my $cookie = ( - Scalar::Util::blessed($val) + blessed($val) ? $val : CGI::Simple::Cookie->new( -name => $name,