Avoid autovivification
[gitmo/Mouse.git] / lib / Mouse / Exporter.pm
index b940779..46e61a3 100644 (file)
@@ -225,6 +225,7 @@ sub do_unimport {
     };
 
     for my $keyword (@{ $spec->{REMOVABLES} }) {
+        next if !exists $stash->{$keyword};
         my $gv = \$stash->{$keyword};
         if(ref($gv) eq 'GLOB' && *{$gv}{CODE} == $spec->{EXPORTS}{$keyword}){ # make sure it is from us
             delete $stash->{$keyword};