This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make Exporter::Heavy correctly not warn when exporting a symbol only
[perl5.git] / lib / Exporter.t
index 2fbfcfa..1639cc1 100644 (file)
@@ -8,7 +8,7 @@ BEGIN {
 }
 
 # Can't use Test::Simple/More, they depend on Exporter.
-my $test = 1;
+my $test;
 sub ok ($;$) {
     my($ok, $name) = @_;
 
@@ -23,9 +23,12 @@ sub ok ($;$) {
 }
 
 
-print "1..28\n";
-require Exporter;
-ok( 1, 'Exporter compiled' );
+BEGIN {
+    $test = 1;
+    print "1..28\n";
+    require Exporter;
+    ok( 1, 'Exporter compiled' );
+}
 
 
 BEGIN {