Change back to B::Hooks::EndOfScope as it previously appeared to fix it - I don't...
Tomas Doran [Tue, 12 May 2009 22:12:00 +0000 (22:12 +0000)]
Makefile.PL
lib/Catalyst.pm

index d53cc28..315b77d 100644 (file)
@@ -6,7 +6,7 @@ name 'Catalyst-Runtime';
 all_from 'lib/Catalyst/Runtime.pm';
 
 requires 'namespace::clean';
-requires 'Scope::Upper' => '0.06';
+requires 'B::Hooks::EndOfScope' => '0.08';
 requires 'MooseX::Emulate::Class::Accessor::Fast' => '0.00801';
 requires 'Class::MOP' => '0.83';
 requires 'Moose' => '0.76';
index edd217e..62fc85b 100644 (file)
@@ -4,7 +4,7 @@ use Moose;
 extends 'Catalyst::Component';
 use Moose::Util qw/find_meta/;
 use bytes;
-use Scope::Upper ();
+use B::Hooks::EndOfScope ();
 use Catalyst::Exception;
 use Catalyst::Log;
 use Catalyst::Request;
@@ -1099,7 +1099,7 @@ 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).
-    Scope::Upper::reap(sub {
+    B::Hooks::EndOfScope::on_scope_end {
         my $meta = Class::MOP::get_metaclass_by_name($class);
         if ( $meta->is_immutable && ! { $meta->immutable_options }->{inline_constructor} ) {
             die "You made your application class ($class) immutable, "
@@ -1108,7 +1108,7 @@ EOF
                 . "(replace_constructor => 1) when making your class immutable.\n";
         }
         $meta->make_immutable(replace_constructor => 1) unless $meta->is_immutable;
-    }, Scope::Upper::SCOPE(1));
+    };
 
     $class->setup_finalize;
 }