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 /
t /
Delete
Unzip
Name
Size
Permission
Date
Action
basic.t
3.9
KB
-r--r--r--
2014-12-27 11:48
blocks.t
2.21
KB
-r--r--r--
2014-12-27 11:48
context.t
3.47
KB
-r--r--r--
2014-12-27 11:48
end.t
1.32
KB
-r--r--r--
2014-12-27 11:48
err.t
1.53
KB
-r--r--r--
2014-12-27 11:49
exit.t
4.62
KB
-r--r--r--
2014-12-27 11:49
free.t
3.87
KB
-r--r--r--
2014-12-27 11:48
free2.t
5.74
KB
-r--r--r--
2014-12-27 11:48
join.t
5.27
KB
-r--r--r--
2014-12-27 11:48
kill.t
3.47
KB
-r--r--r--
2014-12-27 11:48
kill2.t
2.36
KB
-r--r--r--
2014-12-27 11:48
libc.t
1016
B
-r--r--r--
2014-12-27 11:48
list.t
1.79
KB
-r--r--r--
2014-12-27 11:48
no_threads.t
692
B
-r--r--r--
2014-12-27 11:48
problems.t
4.61
KB
-r--r--r--
2014-12-27 11:48
stack.t
2.63
KB
-r--r--r--
2014-12-27 11:48
stack_env.t
964
B
-r--r--r--
2014-12-27 11:48
state.t
6.53
KB
-r--r--r--
2014-12-27 11:48
stress_cv.t
1.04
KB
-r--r--r--
2014-12-27 11:48
stress_re.t
1.15
KB
-r--r--r--
2014-12-27 11:48
stress_string.t
1.03
KB
-r--r--r--
2014-12-27 11:48
thread.t
7.11
KB
-r--r--r--
2014-12-27 11:49
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; use threads; BEGIN { if (! eval 'use threads::shared; 1') { print("1..0 # SKIP threads::shared not available\n"); exit(0); } $| = 1; print("1..31\n"); ### Number of tests that will be run ### }; my $TEST; BEGIN { share($TEST); $TEST = 1; } ok(1, 'Loaded'); sub ok { my ($ok, $name) = @_; lock($TEST); my $id = $TEST++; # 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); } ### Start of Testing ### sub foo { my $context = shift; my $wantarray = wantarray(); if ($wantarray) { ok($context eq 'array', 'Array/list context'); return ('array'); } elsif (defined($wantarray)) { ok($context eq 'scalar', 'Scalar context'); return 'scalar'; } else { ok($context eq 'void', 'Void context'); return; } } my ($thr) = threads->create('foo', 'array'); my ($res) = $thr->join(); ok($res eq 'array', 'Implicit array context'); $thr = threads->create('foo', 'scalar'); $res = $thr->join(); ok($res eq 'scalar', 'Implicit scalar context'); threads->create('foo', 'void'); ($thr) = threads->list(); $res = $thr->join(); ok(! defined($res), 'Implicit void context'); $thr = threads->create({'context' => 'array'}, 'foo', 'array'); ($res) = $thr->join(); ok($res eq 'array', 'Explicit array context'); ($thr) = threads->create({'scalar' => 'scalar'}, 'foo', 'scalar'); $res = $thr->join(); ok($res eq 'scalar', 'Explicit scalar context'); $thr = threads->create({'void' => 1}, 'foo', 'void'); $res = $thr->join(); ok(! defined($res), 'Explicit void context'); sub bar { my $context = shift; my $wantarray = threads->wantarray(); if ($wantarray) { ok($context eq 'list', 'Array/list context'); return ('list'); } elsif (defined($wantarray)) { ok($context eq 'scalar', 'Scalar context'); return 'scalar'; } else { ok($context eq 'void', 'Void context'); return; } } ($thr) = threads->create('bar', 'list'); my $ctx = $thr->wantarray(); ok($ctx, 'Implicit array context'); ($res) = $thr->join(); ok($res eq 'list', 'Implicit array context'); $thr = threads->create('bar', 'scalar'); $ctx = $thr->wantarray(); ok(defined($ctx) && !$ctx, 'Implicit scalar context'); $res = $thr->join(); ok($res eq 'scalar', 'Implicit scalar context'); threads->create('bar', 'void'); ($thr) = threads->list(); $ctx = $thr->wantarray(); ok(! defined($ctx), 'Implicit void context'); $res = $thr->join(); ok(! defined($res), 'Implicit void context'); $thr = threads->create({'context' => 'list'}, 'bar', 'list'); $ctx = $thr->wantarray(); ok($ctx, 'Explicit array context'); ($res) = $thr->join(); ok($res eq 'list', 'Explicit array context'); ($thr) = threads->create({'scalar' => 'scalar'}, 'bar', 'scalar'); $ctx = $thr->wantarray(); ok(defined($ctx) && !$ctx, 'Explicit scalar context'); $res = $thr->join(); ok($res eq 'scalar', 'Explicit scalar context'); $thr = threads->create({'void' => 1}, 'bar', 'void'); $ctx = $thr->wantarray(); ok(! defined($ctx), 'Explicit void context'); $res = $thr->join(); ok(! defined($res), 'Explicit void context'); exit(0); # EOF