threads::shared 1.22
[p5sagit/p5-mst-13.2.git] / ext / threads / shared / t / blessed.t
index 4408c36..225725f 100644 (file)
@@ -8,7 +8,7 @@ BEGIN {
     }
     use Config;
     if (! $Config{'useithreads'}) {
-        print("1..0 # Skip: Perl not compiled with 'useithreads'\n");
+        print("1..0 # SKIP Perl not compiled with 'useithreads'\n");
         exit(0);
     }
 }
@@ -99,28 +99,28 @@ ok(23, ref($$hobj{'array'}) eq 'yang', "blessed array in hash");
 ok(24, ref($$hobj{'scalar'}) eq 'baz', "blessed scalar in hash");
 ok(25, ${$$hobj{'scalar'}} eq '3', "blessed scalar in hash contents");
 
-threads->new(sub {
-                # Rebless objects
-                bless $hobj, 'oof';
-                bless $aobj, 'rab';
-                bless $sobj, 'zab';
-
-                my $data = $$aobj[0];
-                bless $data, 'niy';
-                $$aobj[0] = $data;
-                $data = $$aobj[1];
-                bless $data, 'gnay';
-                $$aobj[1] = $data;
-
-                $data = $$hobj{'hash'};
-                bless $data, 'niy';
-                $$hobj{'hash'} = $data;
-                $data = $$hobj{'array'};
-                bless $data, 'gnay';
-                $$hobj{'array'} = $data;
-
-                $$sobj = 'test';
-             })->join;
+threads->create(sub {
+                    # Rebless objects
+                    bless $hobj, 'oof';
+                    bless $aobj, 'rab';
+                    bless $sobj, 'zab';
+
+                    my $data = $$aobj[0];
+                    bless $data, 'niy';
+                    $$aobj[0] = $data;
+                    $data = $$aobj[1];
+                    bless $data, 'gnay';
+                    $$aobj[1] = $data;
+
+                    $data = $$hobj{'hash'};
+                    bless $data, 'niy';
+                    $$hobj{'hash'} = $data;
+                    $data = $$hobj{'array'};
+                    bless $data, 'gnay';
+                    $$hobj{'array'} = $data;
+
+                    $$sobj = 'test';
+                })->join();
 
 # Test reblessing
 ok(26, ref($hobj) eq 'oof', "hash reblessing does work");
@@ -138,4 +138,6 @@ ok(35, ref($$hobj{'array'}) eq 'gnay', "reblessed array in hash");
 ok(36, ref($$hobj{'scalar'}) eq 'zab', "reblessed scalar in hash");
 ok(37, ${$$hobj{'scalar'}} eq 'test', "reblessed scalar in hash contents");
 
+exit(0);
+
 # EOF