From: Jerry D. Hedden Date: Mon, 23 Feb 2009 20:11:01 +0000 (-0500) Subject: Upgrade to threads 1.72 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e301958b4a047f87d3a6999ce873534a3429eec3;p=p5sagit%2Fp5-mst-13.2.git Upgrade to threads 1.72 --- diff --git a/ext/threads/t/blocks.t b/ext/threads/t/blocks.t index 33a345d..c8ea07d 100644 --- a/ext/threads/t/blocks.t +++ b/ext/threads/t/blocks.t @@ -18,11 +18,7 @@ use ExtUtils::testlib; use threads; BEGIN { - eval { - require threads::shared; - threads::shared->import(); - }; - if ($@ || ! $threads::shared::threads_shared) { + if (! eval 'use threads::shared; 1') { print("1..0 # SKIP threads::shared not available\n"); exit(0); } diff --git a/ext/threads/t/context.t b/ext/threads/t/context.t index ed1c14e..bddb07f 100644 --- a/ext/threads/t/context.t +++ b/ext/threads/t/context.t @@ -18,11 +18,7 @@ use ExtUtils::testlib; use threads; BEGIN { - eval { - require threads::shared; - threads::shared->import(); - }; - if ($@ || ! $threads::shared::threads_shared) { + if (! eval 'use threads::shared; 1') { print("1..0 # SKIP threads::shared not available\n"); exit(0); } diff --git a/ext/threads/t/end.t b/ext/threads/t/end.t index 6aafc4d..1746c2b 100644 --- a/ext/threads/t/end.t +++ b/ext/threads/t/end.t @@ -18,11 +18,7 @@ use ExtUtils::testlib; use threads; BEGIN { - eval { - require threads::shared; - threads::shared->import(); - }; - if ($@ || ! $threads::shared::threads_shared) { + if (! eval 'use threads::shared; 1') { print("1..0 # SKIP threads::shared not available\n"); exit(0); } diff --git a/ext/threads/t/exit.t b/ext/threads/t/exit.t index e769d0c..76b03d6 100644 --- a/ext/threads/t/exit.t +++ b/ext/threads/t/exit.t @@ -22,11 +22,7 @@ use ExtUtils::testlib; use threads; BEGIN { - eval { - require threads::shared; - import threads::shared; - }; - if ($@ || ! $threads::shared::threads_shared) { + if (! eval 'use threads::shared; 1') { skip_all('threads::shared not available'); } @@ -57,7 +53,7 @@ my $rc = $thr->join(); ok(! defined($rc), 'Exited: threads->exit()'); -run_perl(prog => 'use threads 1.71;' . +run_perl(prog => 'use threads 1.72;' . 'threads->exit(86);' . 'exit(99);', nolib => ($ENV{PERL_CORE}) ? 0 : 1, @@ -107,7 +103,7 @@ $rc = $thr->join(); ok(! defined($rc), 'Exited: $thr->set_thread_exit_only'); -run_perl(prog => 'use threads 1.71 qw(exit thread_only);' . +run_perl(prog => 'use threads 1.72 qw(exit thread_only);' . 'threads->create(sub { exit(99); })->join();' . 'exit(86);', nolib => ($ENV{PERL_CORE}) ? 0 : 1, @@ -117,7 +113,7 @@ run_perl(prog => 'use threads 1.71 qw(exit thread_only);' . is($?>>8, 86, "'use threads 'exit' => 'thread_only'"); } -my $out = run_perl(prog => 'use threads 1.71;' . +my $out = run_perl(prog => 'use threads 1.72;' . 'threads->create(sub {' . ' exit(99);' . '});' . @@ -133,7 +129,7 @@ my $out = run_perl(prog => 'use threads 1.71;' . like($out, '1 finished and unjoined', "exit(status) in thread"); -$out = run_perl(prog => 'use threads 1.71 qw(exit thread_only);' . +$out = run_perl(prog => 'use threads 1.72 qw(exit thread_only);' . 'threads->create(sub {' . ' threads->set_thread_exit_only(0);' . ' exit(99);' . @@ -150,7 +146,7 @@ $out = run_perl(prog => 'use threads 1.71 qw(exit thread_only);' . like($out, '1 finished and unjoined', "set_thread_exit_only(0)"); -run_perl(prog => 'use threads 1.71;' . +run_perl(prog => 'use threads 1.72;' . 'threads->create(sub {' . ' $SIG{__WARN__} = sub { exit(99); };' . ' die();' . diff --git a/ext/threads/t/free.t b/ext/threads/t/free.t index 2c91189..87fdae9 100644 --- a/ext/threads/t/free.t +++ b/ext/threads/t/free.t @@ -24,11 +24,7 @@ use ExtUtils::testlib; use threads; BEGIN { - eval { - require threads::shared; - threads::shared->import(); - }; - if ($@ || ! $threads::shared::threads_shared) { + if (! eval 'use threads::shared; 1') { Test::skip_all(q/threads::shared not available/); } diff --git a/ext/threads/t/free2.t b/ext/threads/t/free2.t index f72bc37..c4d6981 100644 --- a/ext/threads/t/free2.t +++ b/ext/threads/t/free2.t @@ -24,11 +24,7 @@ use ExtUtils::testlib; use threads; BEGIN { - eval { - require threads::shared; - threads::shared->import(); - }; - if ($@ || ! $threads::shared::threads_shared) { + if (! eval 'use threads::shared; 1') { Test::skip_all(q/threads::shared not available/); } diff --git a/ext/threads/t/join.t b/ext/threads/t/join.t index cd15629..af999d3 100644 --- a/ext/threads/t/join.t +++ b/ext/threads/t/join.t @@ -18,11 +18,7 @@ use ExtUtils::testlib; use threads; BEGIN { - eval { - require threads::shared; - threads::shared->import(); - }; - if ($@ || ! $threads::shared::threads_shared) { + if (! eval 'use threads::shared; 1') { print("1..0 # SKIP threads::shared not available\n"); exit(0); } diff --git a/ext/threads/t/kill.t b/ext/threads/t/kill.t index cf0f1b4..fe44294 100644 --- a/ext/threads/t/kill.t +++ b/ext/threads/t/kill.t @@ -18,11 +18,7 @@ use ExtUtils::testlib; use threads; BEGIN { - eval { - require threads::shared; - threads::shared->import(); - }; - if ($@ || ! $threads::shared::threads_shared) { + if (! eval 'use threads::shared; 1') { print("1..0 # SKIP threads::shared not available\n"); exit(0); } diff --git a/ext/threads/t/problems.t b/ext/threads/t/problems.t index 01291b2..d6c80c5 100644 --- a/ext/threads/t/problems.t +++ b/ext/threads/t/problems.t @@ -18,11 +18,7 @@ use ExtUtils::testlib; use threads; BEGIN { - eval { - require threads::shared; - threads::shared->import(); - }; - if ($@ || ! $threads::shared::threads_shared) { + if (! eval 'use threads::shared; 1') { print("1..0 # SKIP threads::shared not available\n"); exit(0); } diff --git a/ext/threads/t/state.t b/ext/threads/t/state.t index cda211b..01371fd 100644 --- a/ext/threads/t/state.t +++ b/ext/threads/t/state.t @@ -18,11 +18,7 @@ use ExtUtils::testlib; use threads; BEGIN { - eval { - require threads::shared; - threads::shared->import(); - }; - if ($@ || ! $threads::shared::threads_shared) { + if (! eval 'use threads::shared; 1') { print("1..0 # SKIP threads::shared not available\n"); exit(0); } diff --git a/ext/threads/t/thread.t b/ext/threads/t/thread.t index db006ce..b3407b1 100644 --- a/ext/threads/t/thread.t +++ b/ext/threads/t/thread.t @@ -20,11 +20,7 @@ use ExtUtils::testlib; use threads; BEGIN { - eval { - require threads::shared; - threads::shared->import(); - }; - if ($@ || ! $threads::shared::threads_shared) { + if (! eval 'use threads::shared; 1') { skip_all('threads::shared not available'); } @@ -170,7 +166,7 @@ package main; # bugid #24165 -run_perl(prog => 'use threads 1.71;' . +run_perl(prog => 'use threads 1.72;' . 'sub a{threads->create(shift)} $t = a sub{};' . '$t->tid; $t->join; $t->tid', nolib => ($ENV{PERL_CORE}) ? 0 : 1, diff --git a/ext/threads/threads.pm b/ext/threads/threads.pm index 6bf15d0..8e2b581 100644 --- a/ext/threads/threads.pm +++ b/ext/threads/threads.pm @@ -5,7 +5,7 @@ use 5.008; use strict; use warnings; -our $VERSION = '1.71'; +our $VERSION = '1.72'; my $XS_VERSION = $VERSION; $VERSION = eval $VERSION; @@ -134,7 +134,7 @@ threads - Perl interpreter-based threads =head1 VERSION -This document describes threads version 1.71 +This document describes threads version 1.72 =head1 SYNOPSIS @@ -1011,7 +1011,7 @@ L Discussion Forum on CPAN: L Annotated POD for L: -L +L Source repository: L