4 use Test::More tests => 6;
12 use base 'Class::MOP::Class';
15 use base 'Class::MOP::Class';
18 use base 'Foo::Meta', 'Bar::Meta';
24 metaclass->import('Foo::Meta');
26 ok(!$@, '... Foo.meta => Foo::Meta is compatible') || diag $@;
31 metaclass->import('Bar::Meta');
33 ok(!$@, '... Bar.meta => Bar::Meta is compatible') || diag $@;
38 metaclass->import('Bar::Meta');
39 Foo::Foo->meta->superclasses('Foo');
41 ok($@, '... Foo::Foo.meta => Bar::Meta is not compatible') || diag $@;
46 metaclass->import('Foo::Meta');
47 Bar::Bar->meta->superclasses('Bar');
49 ok($@, '... Bar::Bar.meta => Foo::Meta is not compatible') || diag $@;
54 metaclass->import('FooBar::Meta');
55 FooBar->meta->superclasses('Foo');
57 ok(!$@, '... FooBar.meta => FooBar::Meta is compatible') || diag $@;
62 metaclass->import('FooBar::Meta');
63 FooBar2->meta->superclasses('Bar');
65 ok(!$@, '... FooBar2.meta => FooBar::Meta is compatible') || diag $@;