fix trying to localize a lexical (RT#79257)
Jesse Luehrs [Wed, 19 Sep 2012 20:52:09 +0000 (15:52 -0500)]
lib/Moose/Exporter.pm

index fc3a495..3ec1173 100644 (file)
@@ -134,13 +134,13 @@ sub _make_exporter {
 }
 
 {
-    my $seen = {};
+    our %_seen;
 
     sub _follow_also {
         my $class             = shift;
         my $exporting_package = shift;
 
-        local %$seen = ( $exporting_package => 1 );
+        local %_seen = ( $exporting_package => 1 );
 
         return uniq( _follow_also_real($exporting_package) );
     }
@@ -165,9 +165,9 @@ sub _make_exporter {
         for my $package (@also) {
             die
                 "Circular reference in 'also' parameter to Moose::Exporter between $exporting_package and $package"
-                if $seen->{$package};
+                if $_seen{$package};
 
-            $seen->{$package} = 1;
+            $_seen{$package} = 1;
         }
 
         return map { $_, _follow_also_real($_) } @also;