From: gfx Date: Fri, 18 Dec 2009 04:33:43 +0000 (+0900) Subject: Avoid autovivification X-Git-Tag: 0.45~12 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=commitdiff_plain;h=21df8e4260c69b319fb907e2199236d225ebbaaf Avoid autovivification --- diff --git a/lib/Mouse/Exporter.pm b/lib/Mouse/Exporter.pm index b940779..46e61a3 100644 --- a/lib/Mouse/Exporter.pm +++ b/lib/Mouse/Exporter.pm @@ -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};