package Catalyst;
use Moose;
+use Moose::Meta::Class ();
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;
# 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, "
+ warn "You made your application class ($class) immutable, "
. "but did not inline the constructor.\n"
. "This will break catalyst, please pass "
. "(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;
}
sub _controller_init_base_classes {
my ($app_class, $component) = @_;
foreach my $class ( reverse @{ mro::get_linear_isa($component) } ) {
- Moose->init_meta( for_class => $class )
+ Moose::Meta::Class->initialize( $class )
unless find_meta($class);
}
}
rafl: Florian Ragwitz <rafl@debian.org>
+random: Roland Lammel <lammel@cpan.org>
+
sky: Arthur Bergman
the_jester: Jesse Sheidlower