9 no warnings 'redefine';
21 no warnings 'redefine';
31 no warnings 'redefine';
35 my %stash = %{Moo::_Utils::_getstash(__PACKAGE__)};
37 my %stash2 = %{Moo::_Utils::_getstash(__PACKAGE__)};
38 main::is_deeply(\%stash, \%stash2, "stash of non-Moo class remains untouched");
42 package GlobalConflict;
46 no warnings 'redefine';
62 no warnings 'redefine';
66 my %stash = %{Moo::_Utils::_getstash(__PACKAGE__)};
68 my %stash2 = %{Moo::_Utils::_getstash(__PACKAGE__)};
69 main::is_deeply(\%stash, \%stash2, "stash of non-Moo role remains untouched");
72 ok(!Spoon->can('extends'), 'extends cleaned');
73 is(Spoon->has, "has!", 'has left alone');
75 ok(!Roller->can('has'), 'has cleaned');
76 is(Roller->with, "with!", 'with left alone');
78 is(NoMooClass->has, "has!", 'has left alone');
80 ok(!GlobalConflict->can('extends'), 'extends cleaned');
81 is(GlobalConflict->has, "has!", 'has left alone');
84 is($GlobalConflict::around, "has!", 'package global left alone');
87 ok(RollerTiny->can('around'), 'around left alone');
88 is(RollerTiny->with, "with!", 'with left alone');