2 # This is automatically generated by author/import-moose-test.pl.
3 # DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
4 use t::lib::MooseCompat;
12 'Test::Output' => '0.01', # skip all if not installed
21 return bless { not_moose => 1 }, $class;
32 sub { Foo->meta->make_immutable },
33 qr/\QNot inlining 'new' for Foo since it is not inheriting the default Mouse::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/,
34 'got a warning that Foo may not have an inlined constructor'
39 Foo->meta->find_method_by_name('new')->body,
41 'Foo->new is inherited from NotMoose'
51 sub { Bar->meta->make_immutable( replace_constructor => 1 ) },
53 'no warning when replace_constructor is true'
58 Bar->meta->find_method_by_name('new')->package_name,
60 'Bar->new is inlined, and not inherited from NotMoose'
67 Baz->meta->make_immutable;
77 sub { Quux->meta->make_immutable },
79 'no warning when inheriting from a class that has already made itself immutable'
84 package My::Constructor;
85 use base 'Mouse::Meta::Method';
92 CustomCons->meta->make_immutable( constructor_class => 'My::Constructor' );
102 sub { Subclass->meta->make_immutable },
104 'no warning when inheriting from a class that has already made itself immutable'