Don't call get_all_package_symbols in list context
Dave Rolsky [Fri, 5 Dec 2008 15:01:31 +0000 (15:01 +0000)]
lib/Moose/Meta/Role.pm

index 463951b..31e8437 100644 (file)
@@ -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} &&