From: gfx Date: Fri, 26 Feb 2010 09:16:17 +0000 (+0900) Subject: No constant.pm X-Git-Tag: 0.50_04~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=57633577acaebd562d9bf8a798bb66f5840d88c7;p=gitmo%2FMouse.git No constant.pm --- diff --git a/lib/Mouse/Exporter.pm b/lib/Mouse/Exporter.pm index 2ee752b..e44c256 100644 --- a/lib/Mouse/Exporter.pm +++ b/lib/Mouse/Exporter.pm @@ -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}){