From: Shawn M Moore Date: Tue, 17 Jun 2008 04:16:25 +0000 (+0000) Subject: Need to unimport Mouse::Role's keywords X-Git-Tag: 0.19~294 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e71d80332383fc71e303ce387e6ed4be90a5d35e;p=gitmo%2FMouse.git Need to unimport Mouse::Role's keywords --- diff --git a/lib/Mouse/Role.pm b/lib/Mouse/Role.pm index 3b455de..57f319d 100644 --- a/lib/Mouse/Role.pm +++ b/lib/Mouse/Role.pm @@ -72,6 +72,13 @@ do { } sub unimport { + my $caller = caller; + + no strict 'refs'; + for my $keyword (keys %exports) { + next if $keyword eq 'meta'; # we don't delete this one + delete ${ $caller . '::' }{$keyword}; + } } };