From: gfx Date: Thu, 8 Oct 2009 04:25:56 +0000 (+0900) Subject: Fix Mouse::Exporter to work with Mouse::Tiny X-Git-Tag: 0.37_04~21 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=commitdiff_plain;h=99934a1bfc3a877dae3e8425cb45b5b0c949ee20 Fix Mouse::Exporter to work with Mouse::Tiny --- diff --git a/lib/Mouse/Exporter.pm b/lib/Mouse/Exporter.pm index c701eea..3fcae65 100644 --- a/lib/Mouse/Exporter.pm +++ b/lib/Mouse/Exporter.pm @@ -6,14 +6,14 @@ use Carp qw(confess); my %SPEC; -my $strict_bits = strict::bits(qw(subs refs vars)); +use constant _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; } @@ -150,7 +150,7 @@ sub do_import { } } - $^H |= $strict_bits; # strict->import; + $^H |= _strict_bits; # strict->import; ${^WARNING_BITS} = $warnings::Bits{all}; # warnings->import; if($into eq 'main' && !$spec->{_export_to_main}){ @@ -223,6 +223,8 @@ sub _get_caller_package { } } +#sub _spec{ %SPEC } + 1; __END__ @@ -277,4 +279,4 @@ but you can easily get the metaclass by C<< caller->meta >> as L show L -=cut +=cut \ No newline at end of file