From: Graham Knop Date: Thu, 29 Aug 2013 06:28:35 +0000 (-0400) Subject: use util routine to get stash X-Git-Tag: v1.003001~14 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a8feb88acebbed6e24683e851ec9c8c120cd4393;p=gitmo%2FMoo.git use util routine to get stash --- diff --git a/lib/Moo/Role.pm b/lib/Moo/Role.pm index c25e937..edbbdc8 100644 --- a/lib/Moo/Role.pm +++ b/lib/Moo/Role.pm @@ -30,7 +30,7 @@ sub import { } $INFO{$target} ||= {}; # get symbol table reference - my $stash = do { no strict 'refs'; \%{"${target}::"} }; + my $stash = _getstash($target); _install_tracked $target => has => sub { my $name_proto = shift; my @name_proto = ref $name_proto eq 'ARRAY' ? @$name_proto : $name_proto;