use warnings;
use Test::More;
-use Test::Fatal;
+use Test::Exception;
BEGIN {
ok( MyClass->meta->meta->does_role('MyRole'), 'metaclass does MyRole' );
is( MyClass->meta->foo, 'i am foo', '... foo method returns expected value' );
-ok ! exception {
+lives_ok {
MyClass->meta->make_immutable;
-}, '... make MyClass immutable okay';
+} '... make MyClass immutable okay';
is(MyClass->meta, $mc, '... these metas are still the same thing');
is(MyClass->meta->meta, $mc->meta, '... these meta-metas are the same thing');
ok( MyClass->meta->meta->does_role('MyRole'), 'metaclass does MyRole' );
is( MyClass->meta->foo, 'i am foo', '... foo method returns expected value' );
-ok ! exception {
+lives_ok {
MyClass->meta->make_mutable;
-}, '... make MyClass mutable okay';
+} '... make MyClass mutable okay';
is(MyClass->meta, $mc, '... these metas are still the same thing');
is(MyClass->meta->meta, $mc->meta, '... these meta-metas are the same thing');
ok( MyClass->meta->meta->does_role('MyRole'), 'metaclass does MyRole' );
is( MyClass->meta->foo, 'i am foo', '... foo method returns expected value' );
-ok ! exception {
+lives_ok {
MyMetaclass->meta->make_immutable;
-}, '... make MyMetaclass immutable okay';
+} '... make MyMetaclass immutable okay';
is(MyClass->meta, $mc, '... these metas are still the same thing');
is(MyClass->meta->meta, $mc->meta, '... these meta-metas are the same thing');
ok( MyClass->meta->meta->does_role('MyRole'), 'metaclass does MyRole' );
is( MyClass->meta->foo, 'i am foo', '... foo method returns expected value' );
-ok ! exception {
+lives_ok {
MyClass->meta->make_immutable;
-}, '... make MyClass immutable (again) okay';
+} '... make MyClass immutable (again) okay';
is(MyClass->meta, $mc, '... these metas are still the same thing');
is(MyClass->meta->meta, $mc->meta, '... these meta-metas are the same thing');