will be merged when an application is started. Configuration loaded with
L<Catalyst::Plugin::ConfigLoader> takes precedence over other configuration,
followed by configuration in your top level C<MyApp> class. These two
-configurations are merged, and then configuration data whos hash key matches a
+configurations are merged, and then configuration data whose hash key matches a
component name is merged with configuration for that component.
The configuration for a component is then passed to the C<new> method when a
# applying modifiers).
Scope::Upper::reap(sub {
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, "
+ . "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));
=cut
sub _controller_init_base_classes {
- my ($class, $component) = @_;
+ my ($app_class, $component) = @_;
foreach my $class ( reverse @{ mro::get_linear_isa($component) } ) {
Moose->init_meta( for_class => $class )
unless find_meta($class);