From: Jesse Luehrs Date: Wed, 19 Sep 2012 20:52:09 +0000 (-0500) Subject: fix trying to localize a lexical (RT#79257) X-Git-Tag: 2.0604~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=779259981adbe742004aedbb380103aff34d7116;p=gitmo%2FMoose.git fix trying to localize a lexical (RT#79257) --- diff --git a/lib/Moose/Exporter.pm b/lib/Moose/Exporter.pm index fc3a495..3ec1173 100644 --- a/lib/Moose/Exporter.pm +++ b/lib/Moose/Exporter.pm @@ -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;