9 'Test::Output' => '0.01', # skip all if not installed
18 return bless { not_moose => 1 }, $class;
29 sub { Foo->meta->make_immutable },
30 qr/\QNot inlining 'new' for Foo since it is not inheriting the default Moose::Object::new\E\s+\QIf you are certain you don't need to inline your constructor, specify inline_constructor => 0 in your call to Foo->meta->make_immutable/,
31 'got a warning that Foo may not have an inlined constructor'
36 Foo->meta->find_method_by_name('new')->body,
38 'Foo->new is inherited from NotMoose'
48 sub { Bar->meta->make_immutable( replace_constructor => 1 ) },
50 'no warning when replace_constructor is true'
55 Bar->meta->find_method_by_name('new')->package_name,
57 'Bar->new is inlined, and not inherited from NotMoose'
64 Baz->meta->make_immutable;
74 sub { Quux->meta->make_immutable },
76 'no warning when inheriting from a class that has already made itself immutable'
81 package My::Constructor;
82 use base 'Moose::Meta::Method::Constructor';
89 CustomCons->meta->make_immutable( constructor_class => 'My::Constructor' );
99 sub { Subclass->meta->make_immutable },
101 'no warning when inheriting from a class that has already made itself immutable'