11 eval "use Test::Output;";
12 plan skip_all => "Test::Output is required for this test" if $@;
27 __PACKAGE__->meta->make_immutable
28 } qr/^Calling make_immutable on Foo::Sub, which has a mutable ancestor \(Foo\)/,
29 "warning when making a class with mutable ancestors immutable";
32 Foo->meta->make_immutable;
40 __PACKAGE__->meta->make_immutable
41 } '', "no warning when all ancestors are immutable";
51 package Foo::Sub3::Sub;
57 package Foo::Sub3::Sub::Sub;
59 extends 'Foo::Sub3::Sub';
62 __PACKAGE__->meta->make_immutable
63 } qr/^Calling make_immutable on Foo::Sub3::Sub::Sub, which has a mutable ancestor \(Foo::Sub3::Sub\)/,
64 "warning when making a class with mutable ancestors immutable";
68 require Recursive::Parent
69 } qr/^Calling make_immutable on Recursive::Child, which has a mutable ancestor \(Recursive::Parent\)/,
70 "circular dependencies via use are caught properly";