Add newline to the end of the file
[gitmo/Mouse.git] / lib / Mouse / Exporter.pm
index 881a6aa..971be8a 100644 (file)
@@ -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;
 }
@@ -113,7 +113,7 @@ sub setup_import_methods{
     # for backward compatibility
 
     *{$exporting_package . '::export_to_level'} = sub{
-        my($package, $level, @args) = @_;
+        my($package, $level, undef, @args) = @_; # the third argument is redundant
         do_import($package, { into_level => $level + 1 }, @args);
     };
     *{$exporting_package . '::export'} = sub{
@@ -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__
@@ -278,3 +280,4 @@ but you can easily get the metaclass by C<< caller->meta >> as L</SYNOPSIS> show
 L<Moose::Exporter>
 
 =cut
+