- reverted previous change
[catagits/Catalyst-Runtime.git] / lib / Catalyst.pm
index fde9681..2d26d27 100644 (file)
@@ -16,8 +16,6 @@ use Path::Class;
 use Time::HiRes qw/gettimeofday tv_interval/;
 use URI;
 use Scalar::Util qw/weaken/;
-use Hash::Util qw/lock_hash/;
-use HTTP::Headers::ReadOnly;
 use attributes;
 
 __PACKAGE__->mk_accessors(
@@ -56,7 +54,7 @@ __PACKAGE__->engine_class('Catalyst::Engine::CGI');
 __PACKAGE__->request_class('Catalyst::Request');
 __PACKAGE__->response_class('Catalyst::Response');
 
-our $VERSION = '5.52';
+our $VERSION = '5.54';
 
 sub import {
     my ( $class, @arguments ) = @_;
@@ -1025,11 +1023,7 @@ Finalizes cookies.
 
 =cut
 
-sub finalize_cookies {
-       my $c = shift;
-       $c->engine->finalize_cookies( $c, @_ );
-       lock_hash( %$_ ) for $c->res->cookies, values %{ $c->res->cookies };
-}
+sub finalize_cookies { my $c = shift; $c->engine->finalize_cookies( $c, @_ ) }
 
 =item $c->finalize_error
 
@@ -1072,8 +1066,6 @@ sub finalize_headers {
 
     $c->engine->finalize_headers( $c, @_ );
 
-       bless $c->response->headers, "HTTP::Headers::ReadOnly";
-
     # Done
     $c->response->{_finalized_headers} = 1;
 }
@@ -1504,8 +1496,7 @@ qq/Couldn't instantiate component "$component", "new() didn't return a object"/
         return $instance;
     };
 
-    eval {
-        Module::Pluggable::Fast->import(
+    eval "package $class;\n" . q!Module::Pluggable::Fast->import(
             name   => '_catalyst_components',
             search => [
                 "$class\::Controller", "$class\::C",
@@ -1514,7 +1505,7 @@ qq/Couldn't instantiate component "$component", "new() didn't return a object"/
             ],
             callback => $callback
         );
-    };
+    !;
 
     if ( my $error = $@ ) {
 
@@ -1782,9 +1773,6 @@ Writes $data to the output stream. When using this method directly, you
 will need to manually set the C<Content-Length> header to the length of
 your output data, if known.
 
-Also note that any headers created after the write can  no longer be added, and
-this includes cookies.
-
 =cut
 
 sub write {