This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add support for basic support for AVs, references not supported yet.
[perl5.git] / ext / threads / shared / t / sv_refs.t
index 36977e7..86e9f54 100644 (file)
@@ -23,7 +23,7 @@ sub ok {
 use Devel::Peek;
 use ExtUtils::testlib;
 use strict;
-BEGIN { print "1..9\n" };
+BEGIN { print "1..10\n" };
 use threads;
 use threads::shared;
 ok(1,1,"loaded");
@@ -53,4 +53,10 @@ $baz = "original";
 $bar = \$baz;
 $foo = \$bar;
 ok(9,$$$foo eq 'original', "Check reference chain");
-
+my($t1,$t2);
+share($t1);
+share($t2);
+$t2 = "text";
+$t1 = \$t2;
+threads->create(sub { $t1 = "bar" })->join();
+ok(10,$t1 eq 'bar',"Check that assign to a ROK works");