Use bit-or, not simple assignment
gfx [Sat, 31 Oct 2009 04:26:07 +0000 (13:26 +0900)]
lib/Mouse/Exporter.pm

index bd0d7ef..9f95612 100644 (file)
@@ -14,7 +14,7 @@ require Mouse::Util;
 
 sub import{
     $^H              |= _strict_bits;         # strict->import;
-    ${^WARNING_BITS}  = $warnings::Bits{all}; # warnings->import;
+    ${^WARNING_BITS} |= $warnings::Bits{all}; # warnings->import;
     return;
 }
 
@@ -166,7 +166,7 @@ sub do_import {
     }
 
     $^H              |= _strict_bits;         # strict->import;
-    ${^WARNING_BITS}  = $warnings::Bits{all}; # warnings->import;
+    ${^WARNING_BITS} |= $warnings::Bits{all}; # warnings->import;
 
     if($spec->{INIT_META}){
         my $meta;