From: Tomas Doran Date: Tue, 12 May 2009 22:12:00 +0000 (+0000) Subject: Change back to B::Hooks::EndOfScope as it previously appeared to fix it - I don't... X-Git-Tag: 5.80004~27 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=acca8cd512f838b4f863486de70d514ac0fae4bf Change back to B::Hooks::EndOfScope as it previously appeared to fix it - I don't have a live example any more, so this is speculative to get someone to try trunk --- diff --git a/Makefile.PL b/Makefile.PL index d53cc28..315b77d 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -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'; diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index edd217e..62fc85b 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -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; }