threads 1.32
[p5sagit/p5-mst-13.2.git] / ext / threads / t / libc.t
index e7e0c9d..2c24bad 100644 (file)
@@ -29,13 +29,22 @@ sub ok {
     return ($ok);
 }
 
+use threads;
+
 BEGIN {
+    eval {
+        require threads::shared;
+        import threads::shared;
+    };
+    if ($@ || ! $threads::shared::threads_shared) {
+        print("1..0 # Skip: threads::shared not available\n");
+        exit(0);
+    }
+
     $| = 1;
     print("1..12\n");   ### Number of tests that will be run ###
 };
 
-use threads;
-use threads::shared;
 ok(1, 1, 'Loaded');
 
 ### Start of Testing ###