package My::Class;
use Mouse;
- with 'My::Role' => { excludes => 'bar' };
+ with 'My::Role' => { -excludes => 'bar' };
}
ok(My::Class->meta->has_method($_), "we have a $_ method") for qw(foo baz);
package My::OtherRole;
use Mouse::Role;
- with 'My::Role' => { excludes => 'foo' };
+ with 'My::Role' => { -excludes => 'foo' };
sub foo { 'My::OtherRole::foo' }
sub bar { 'My::OtherRole::bar' }
use Mouse;
::lives_ok {
- with 'Foo::Role' => { excludes => 'foo' },
- 'Bar::Role' => { excludes => 'foo' },
+ with 'Foo::Role' => { -excludes => 'foo' },
+ 'Bar::Role' => { -excludes => 'foo' },
'Baz::Role';
} '... composed our roles correctly';
::throws_ok {
with 'Foo::Role',
- 'Bar::Role' => { excludes => 'foo' },
+ 'Bar::Role' => { -excludes => 'foo' },
'Baz::Role';
} qr/Due to a method name conflict in roles 'Baz::Role' and 'Foo::Role', the method 'foo' must be implemented or excluded by 'My::Foo::Class::Broken'/,
'... composed our roles correctly';
use Mouse::Role;
::lives_ok {
- with 'Foo::Role' => { excludes => 'foo' },
- 'Bar::Role' => { excludes => 'foo' },
+ with 'Foo::Role' => { -excludes => 'foo' },
+ 'Bar::Role' => { -excludes => 'foo' },
'Baz::Role';
} '... composed our roles correctly';
}
::lives_ok {
with 'Foo::Role',
- 'Bar::Role' => { excludes => 'foo' },
+ 'Bar::Role' => { -excludes => 'foo' },
'Baz::Role';
} '... composed our roles correctly';
}