{
package Foo;
use Moo::Role;
- use namespace::autoclean;
+ # if we autoclean here there's nothing left and then load_class tries
+ # to require Foo during Moose application and everything breaks.
}
{
package Bar;
::is(Baz->can('thing'), Bar->can('thing'), 'Role copies method correctly');
::ok(Baz->can('attr'), 'Attr accessor correct');
+::ok(!Bar->can('has'), 'Moo::Role sugar removed by autoclean');
+::ok(!Bar->can('with'), 'Role::Tiny sugar removed by autoclean');
::ok(!Baz->can('has'), 'Sugar not copied');
{