Fix the class for init_meta()
[gitmo/Mouse.git] / lib / Mouse / Exporter.pm
index b940779..934b1c3 100644 (file)
@@ -171,7 +171,7 @@ sub do_import {
     if($spec->{INIT_META}){
         my $meta;
         foreach my $init_meta(@{$spec->{INIT_META}}){
-            $meta = $into->$init_meta(for_class => $into);
+            $meta = $package->$init_meta(for_class => $into);
         }
 
         if(@traits){
@@ -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};
@@ -259,7 +260,7 @@ Mouse::Exporter - make an import() and unimport() just like Mouse.pm
 
 =head1 VERSION
 
-This document describes Mouse version 0.44
+This document describes Mouse version 0.47
 
 =head1 SYNOPSIS