Upgrade to File::Path 2.07_03
[p5sagit/p5-mst-13.2.git] / lib / Exporter.t
index 1639cc1..20f6ad3 100644 (file)
@@ -25,7 +25,7 @@ sub ok ($;$) {
 
 BEGIN {
     $test = 1;
-    print "1..28\n";
+    print "1..30\n";
     require Exporter;
     ok( 1, 'Exporter compiled' );
 }
@@ -171,7 +171,7 @@ eval { Yet::More::Testing->require_version(10); 1 };
 
 my $warnings;
 BEGIN {
-    $SIG{__WARN__} = sub { $warnings = join '', @_ };
+    local $SIG{__WARN__} = sub { $warnings = join '', @_ };
     package Testing::Unused::Vars;
     @ISA = qw(Exporter);
     @EXPORT = qw(this $TODO that);
@@ -206,7 +206,6 @@ package The::Import;
 
 use Exporter 'import';
 
-eval { import() };
 ::ok(\&import == \&Exporter::import, "imported the import routine");
 
 @EXPORT = qw( wibble );
@@ -219,3 +218,9 @@ The::Import->import;
 my $val = eval { wibble() };
 ::ok($val eq "wobble", "exported importer worked");
 
+# Check that Carp recognizes Exporter as internal to Perl 
+require Carp;
+eval { Carp::croak() };
+::ok($Carp::Internal{Exporter}, "Carp recognizes Exporter");
+::ok($Carp::Internal{'Exporter::Heavy'}, "Carp recognizes Exporter::Heavy");
+