Only use the imported version of Scalar::Util::blessed for consistency.
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Engine.pm
index 85d4b39..ad2a180 100644 (file)
@@ -12,14 +12,14 @@ use HTTP::Headers;
 use URI::QueryParam;
 use Scalar::Util ();
 
+use namespace::clean -except => 'meta';
+
 # input position and length
 has read_length => (is => 'rw');
 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 +46,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 +76,7 @@ sub finalize_cookies {
         my $val = $response->cookies->{$name};
 
         my $cookie = (
-            Scalar::Util::blessed($val)
+            blessed($val)
             ? $val
             : CGI::Simple::Cookie->new(
                 -name    => $name,
@@ -589,7 +589,7 @@ sub read {
 
 =head2 $self->read_chunk($c, $buffer, $length)
 
-Each engine inplements read_chunk as its preferred way of reading a chunk
+Each engine implements read_chunk as its preferred way of reading a chunk
 of data.
 
 =cut