Checking in changes prior to tagging of version 0.54.
[gitmo/Mouse.git] / lib / Mouse / Exporter.pm
index 4635654..27fe82a 100644 (file)
@@ -9,13 +9,19 @@ my %SPEC;
 my $strict_bits;
 BEGIN{ $strict_bits = strict::bits(qw(subs refs vars)); }
 
+my $warnings_extra_bits;
+BEGIN{ $warnings_extra_bits = warnings::bits(FATAL => 'recursion') }
+
 # 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;
-    ${^WARNING_BITS} |= $warnings::Bits{all}; # warnings->import;
+    # strict->import;
+    $^H              |= $strict_bits;
+    # warnings->import('all', FATAL => 'recursion');
+    ${^WARNING_BITS} |= $warnings::Bits{all};
+    ${^WARNING_BITS} |= $warnings_extra_bits;
     return;
 }
 
@@ -49,7 +55,7 @@ sub setup_import_methods{
 }
 
 sub build_import_methods{
-    my($class, %args) = @_;
+    my($self, %args) = @_;
 
     my $exporting_package = $args{exporting_package} ||= caller();
 
@@ -168,8 +174,10 @@ sub do_import {
         }
     }
 
-    $^H              |= $strict_bits;         # strict->import;
-    ${^WARNING_BITS} |= $warnings::Bits{all}; # warnings->import;
+    $^H              |= $strict_bits;                                 # strict->import;
+    # warnings->import('all', FATAL => 'recursion');
+    ${^WARNING_BITS} |= $warnings::Bits{all};
+    ${^WARNING_BITS} |= $warnings_extra_bits;
 
     if($spec->{INIT_META}){
         my $meta;
@@ -264,7 +272,7 @@ Mouse::Exporter - make an import() and unimport() just like Mouse.pm
 
 =head1 VERSION
 
-This document describes Mouse version 0.50_04
+This document describes Mouse version 0.54
 
 =head1 SYNOPSIS