use strict;
use warnings;
-use Test::More tests => 1;
+use Test::More tests => 39;
use Test::Exception;
BEGIN {
use_ok('Moose::Role');
}
-=begin nonsense
-
{
package FooRole;
use Moose::Role;
'FooRole::blau -> ' . $c->();
};
+}{
package BarClass;
use Moose;
sub boo { 'BarClass::boo' }
sub foo { 'BarClass::foo' } # << the role overrides this ...
+
+ __PACKAGE__->meta->make_immutable(debug => 0);
+}{
package FooClass;
use Moose;
sub blau { 'FooClass::blau' }
sub goo { 'FooClass::goo' } # << overrides the one from the role ...
+
+ __PACKAGE__->meta->make_immutable(debug => 0);
}
my $foo_class_meta = FooClass->meta;
is($foo->boo, 'FooRole::boo -> BarClass::boo', '... got the right value from ->boo');
is($foo->blau, 'FooRole::blau -> FooClass::blau', '... got the right value from ->blau');
-=cut
-