projects
/
gitmo/Moo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
guard against double import
[gitmo/Moo.git]
/
lib
/
Moo
/
Role.pm
diff --git
a/lib/Moo/Role.pm
b/lib/Moo/Role.pm
index
7a7cae1
..
c27c025
100644
(file)
--- a/
lib/Moo/Role.pm
+++ b/
lib/Moo/Role.pm
@@
-11,6
+11,7
@@
our %INFO;
sub import {
my $target = caller;
strictures->import;
+ return if $INFO{$target}; # already exported into this package
# get symbol table reference
my $stash = do { no strict 'refs'; \%{"${target}::"} };
*{_getglob "${target}::has"} = sub {