This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
threads 1.64 (repost)
[perl5.git] / ext / threads / t / end.t
index 70d4188..9960633 100644 (file)
@@ -20,7 +20,7 @@ use threads;
 BEGIN {
     eval {
         require threads::shared;
-        import threads::shared;
+        threads::shared->import();
     };
     if ($@ || ! $threads::shared::threads_shared) {
         print("1..0 # Skip: threads::shared not available\n");
@@ -31,8 +31,11 @@ BEGIN {
     print("1..6\n");   ### Number of tests that will be run ###
 };
 
-my $TEST = 1;
-share($TEST);
+my $TEST;
+BEGIN {
+    share($TEST);
+    $TEST = 1;
+}
 
 ok(1, 'Loaded');