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");
73 package GlobalConflict2;
77 no warnings 'redefine';
85 ok(!Spoon->can('extends'), 'extends cleaned');
86 is(Spoon->has, "has!", 'has left alone');
88 ok(!Roller->can('has'), 'has cleaned');
89 is(Roller->with, "with!", 'with left alone');
91 is(NoMooClass->has, "has!", 'has left alone');
93 ok(!GlobalConflict->can('extends'), 'extends cleaned');
94 is(GlobalConflict->has, "has!", 'has left alone');
97 is($GlobalConflict::around, "has!", 'package global left alone');
100 ok(RollerTiny->can('around'), 'around left alone');
101 is(RollerTiny->with, "with!", 'with left alone');
103 ok(!GlobalConflict2->can('extends'), 'extends cleaned');
104 is(GlobalConflict2->has, "has!", 'has left alone');
107 is($GlobalConflict2::after, "has!", 'package global left alone');