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;
10 $TODO = q{Mouse is not yet completed};
13 'Test::Output' => '0.01', # skip all if not installed
22 return bless { not_moose => 1 }, $class;
33 sub { Foo->meta->make_immutable },
34 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/,
35 'got a warning that Foo may not have an inlined constructor'
40 Foo->meta->find_method_by_name('new')->body,
42 'Foo->new is inherited from NotMouse'
52 sub { Bar->meta->make_immutable( replace_constructor => 1 ) },
54 'no warning when replace_constructor is true'
59 Bar->meta->find_method_by_name('new')->package_name,
61 'Bar->new is inlined, and not inherited from NotMouse'
68 Baz->meta->make_immutable;
78 sub { Quux->meta->make_immutable },
80 'no warning when inheriting from a class that has already made itself immutable'
85 package My::Constructor;
86 use base 'Mouse::Meta::Method';
93 CustomCons->meta->make_immutable( constructor_class => 'My::Constructor' );
100 extends 'CustomCons';
103 sub { Subclass->meta->make_immutable },
105 'no warning when inheriting from a class that has already made itself immutable'