From: Dave Rolsky Date: Fri, 5 Dec 2008 15:01:31 +0000 (+0000) Subject: Don't call get_all_package_symbols in list context X-Git-Tag: 0.62_02~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=534000fdfc34b72565bb32ee72ddad7b7421ad9a;p=gitmo%2FMoose.git Don't call get_all_package_symbols in list context --- diff --git a/lib/Moose/Meta/Role.pm b/lib/Moose/Meta/Role.pm index 463951b..31e8437 100644 --- a/lib/Moose/Meta/Role.pm +++ b/lib/Moose/Meta/Role.pm @@ -311,10 +311,10 @@ sub get_method_map { my $role_name = $self->name; my $method_metaclass = $self->method_metaclass; - my %all_code = $self->get_all_package_symbols('CODE'); + my $all_code = $self->get_all_package_symbols('CODE'); - foreach my $symbol (keys %all_code) { - my $code = $all_code{$symbol}; + foreach my $symbol (keys %{ $all_code }) { + my $code = $all_code->{$symbol}; next if exists $map->{$symbol} && defined $map->{$symbol} &&