X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst.pm;h=db307ab9bc2477df00b3c95b75a8bcaf7fa01717;hb=edb20ed3aaf578b6784f7e0a52ed8c00f05f2718;hp=15b231b5369cd1d747e794de913e7310311d4a17;hpb=3d041c32e1c9ba81fabe6e85c36a9e3ec96f7287;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 15b231b..db307ab 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -8,7 +8,7 @@ use Moose; use Class::MOP::Object (); extends 'Catalyst::Component'; use bytes; -use B::Hooks::EndOfScope; +use Scope::Upper (); use Catalyst::Exception; use Catalyst::Log; use Catalyst::Request; @@ -973,8 +973,8 @@ EOF my $engine = $class->engine; my $home = $class->config->{home}; - $class->log->debug(qq/Loaded dispatcher "$dispatcher"/); - $class->log->debug(qq/Loaded engine "$engine"/); + $class->log->debug(sprintf(q/Loaded dispatcher "%s"/, blessed($dispatcher))); + $class->log->debug(sprintf(q/Loaded engine "%s"/, blessed($engine))); $home ? ( -d $home ) @@ -983,7 +983,7 @@ EOF : $class->log->debug(q/Couldn't find home/); } - # Call plugins setup + # Call plugins setup, this is stupid and evil. { no warnings qw/redefine/; local *setup = sub { }; @@ -1024,10 +1024,10 @@ EOF # Note however that we have to do the work on scope end, so that method # modifiers work correctly in MyApp (as you have to call setup _before_ # applying modifiers). - on_scope_end { + Scope::Upper::reap(sub { my $meta = $class->Moose::Object::meta(); $meta->make_immutable unless $meta->is_immutable; - }; + }, 1); $class->setup_finished(1); } @@ -1747,9 +1747,7 @@ Prepares message body. sub prepare_body { my $c = shift; - #Moose TODO: what is _body ?? - # Do we run for the first time? - return if defined $c->request->{_body}; + return if $c->request->_has_body; # Initialize on-demand data $c->engine->prepare_body( $c, @_ );