No constant.pm
gfx [Fri, 26 Feb 2010 09:16:17 +0000 (18:16 +0900)]
lib/Mouse/Exporter.pm

index 2ee752b..e44c256 100644 (file)
@@ -6,14 +6,15 @@ use Carp qw(confess);
 
 my %SPEC;
 
-use constant _strict_bits => strict::bits(qw(subs refs vars));
+my $strict_bits;
+BEGIN{ $strict_bits = strict::bits(qw(subs refs vars)); }
 
 # it must be "require", because Mouse::Util depends on Mouse::Exporter,
 # which depends on Mouse::Util::import()
 require Mouse::Util;
 
 sub import{
-    $^H              |= _strict_bits;         # strict->import;
+    $^H              |= $strict_bits;         # strict->import;
     ${^WARNING_BITS} |= $warnings::Bits{all}; # warnings->import;
     return;
 }
@@ -162,7 +163,7 @@ sub do_import {
         }
     }
 
-    $^H              |= _strict_bits;         # strict->import;
+    $^H              |= $strict_bits;         # strict->import;
     ${^WARNING_BITS} |= $warnings::Bits{all}; # warnings->import;
 
     if($spec->{INIT_META}){