Linux cpanel2.daytoncreative.net 2.6.32-754.29.2.el6.x86_64 #1 SMP Tue May 12 17:39:04 UTC 2020 x86_64
Apache/2.4.43 (cPanel) OpenSSL/1.1.1g mod_bwlimited/1.4
Server IP : 70.62.220.67 & Your IP : 216.73.216.193
Domains :
Cant Read [ /etc/named.conf ]
User : michaelgreg
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
log /
perl-5.20.2 /
dist /
threads-shared /
t /
Delete
Unzip
Name
Size
Permission
Date
Action
0nothread.t
1.8
KB
-r--r--r--
2014-12-27 11:48
av_refs.t
2.05
KB
-r--r--r--
2014-12-27 11:48
av_simple.t
4
KB
-r--r--r--
2014-12-27 11:49
blessed.t
4.51
KB
-r--r--r--
2014-12-27 11:48
clone.t
4.94
KB
-r--r--r--
2014-12-27 11:48
cond.t
6.14
KB
-r--r--r--
2014-12-27 11:48
disabled.t
1.27
KB
-r--r--r--
2014-12-27 11:48
dualvar.t
8.29
KB
-r--r--r--
2014-12-27 11:48
hv_refs.t
2.97
KB
-r--r--r--
2014-12-27 11:48
hv_simple.t
1.83
KB
-r--r--r--
2014-12-27 11:48
no_share.t
1.29
KB
-r--r--r--
2014-12-27 11:48
object.t
4.03
KB
-r--r--r--
2014-12-27 11:48
object2.t
12.88
KB
-r--r--r--
2014-12-27 11:49
shared_attr.t
1.74
KB
-r--r--r--
2014-12-27 11:48
stress.t
5.93
KB
-r--r--r--
2014-12-27 11:48
sv_refs.t
2.35
KB
-r--r--r--
2014-12-27 11:48
sv_simple.t
1.6
KB
-r--r--r--
2014-12-27 11:48
utf8.t
2.12
KB
-r--r--r--
2014-12-27 11:48
wait.t
9.55
KB
-r--r--r--
2014-12-27 11:48
waithires.t
10.43
KB
-r--r--r--
2014-12-27 11:48
Save
Rename
use strict; use warnings; BEGIN { use Config; if (! $Config{'useithreads'}) { print("1..0 # SKIP Perl not compiled with 'useithreads'\n"); exit(0); } } use ExtUtils::testlib; sub ok { my ($id, $ok, $name) = @_; # You have to do it this way or VMS will get confused. if ($ok) { print("ok $id - $name\n"); } else { print("not ok $id - $name\n"); printf("# Failed test at line %d\n", (caller)[2]); } return ($ok); } BEGIN { $| = 1; print("1..21\n"); ### Number of tests that will be run ### }; use threads; use threads::shared; ok(1, 1, 'Loaded'); ### Start of Testing ### my $foo; my $bar = "foo"; share($foo); eval { $foo = \$bar; }; ok(2,my $temp1 = $@ =~/^Invalid\b.*shared scalar/, "Wrong error message"); share($bar); $foo = \$bar; ok(3, $temp1 = $foo =~/SCALAR/, "Check that is a ref"); ok(4, $$foo eq "foo", "Check that it points to the correct value"); $bar = "yeah"; ok(5, $$foo eq "yeah", "Check that assignment works"); $$foo = "yeah2"; ok(6, $$foo eq "yeah2", "Check that deref assignment works"); threads->create(sub {$bar = "yeah3"})->join(); ok(7, $$foo eq "yeah3", "Check that other thread assignment works"); threads->create(sub {$foo = "artur"})->join(); ok(8, $foo eq "artur", "Check that uncopupling the ref works"); my $baz; share($baz); $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"); ok(11, is_shared($foo), "Check for sharing"); { # Circular references with 3 shared scalars my $x : shared; my $y : shared; my $z : shared; $x = \$y; $y = \$z; $z = \$x; ok(12, ref($x) eq 'REF', '$x ref type'); ok(13, ref($y) eq 'REF', '$y ref type'); ok(14, ref($z) eq 'REF', '$z ref type'); my @q :shared = ($x); ok(15, ref($q[0]) eq 'REF', '$q[0] ref type'); my $w = $q[0]; ok(16, ref($w) eq 'REF', '$w ref type'); ok(17, ref($$w) eq 'REF', '$$w ref type'); ok(18, ref($$$w) eq 'REF', '$$$w ref type'); ok(19, ref($$$$w) eq 'REF', '$$$$w ref type'); ok(20, is_shared($x) == is_shared($w), '_id($x) == _id($w)'); ok(21, is_shared($w) == is_shared($$$$w), '_id($w) == _id($$$$w)'); } exit(0); # EOF