'Carp' => 0,
'XSLoader' => 0,
+ 'Test::More' => 0,
'ExtUtils::testlib' => 0,
'Hash::Util' => 0,
'IO::File' => 0,
@conditional_params
);
+# Additional 'make' targets
+sub MY::postamble
+{
+ return <<'_EXTRAS_';
+fixfiles:
+ @dos2unix `cat MANIFEST`
+ @$(CHMOD) 644 `cat MANIFEST`
+ @$(CHMOD) 755 examples/*.pl
+
+ppport:
+ @( cd /tmp; perl -e 'use Devel::PPPort; Devel::PPPort::WriteFile("ppport.h");' )
+ @if ! cmp -s ppport.h /tmp/ppport.h; then \
+ ( tkdiff ppport.h /tmp/ppport.h & ); \
+ perl /tmp/ppport.h; \
+ fi
+_EXTRAS_
+}
+
# EOF
chdir 't';
unshift @INC, '../lib';
}
+
+ require($ENV{PERL_CORE} ? "./test.pl" : "./t/test.pl");
+
use Config;
if (! $Config{'useithreads'}) {
- print("1..0 # Skip: Perl not compiled with 'useithreads'\n");
- exit(0);
+ skip_all(q/Perl not compiled with 'useithreads'/);
}
-
- require($ENV{PERL_CORE} ? "./test.pl" : "./t/test.pl");
}
+
our $TODO;
use ExtUtils::testlib;
import threads::shared;
};
if ($@ || ! $threads::shared::threads_shared) {
- print("1..0 # Skip: threads::shared not available\n");
- exit(0);
+ skip_all('threads::shared not available');
}
$| = 1;
ok(! defined($rc), 'Exited: threads->exit()');
-run_perl(prog => 'use threads 1.67;' .
+run_perl(prog => 'use threads 1.69;' .
'threads->exit(86);' .
'exit(99);',
nolib => ($ENV{PERL_CORE}) ? 0 : 1,
ok(! defined($rc), 'Exited: $thr->set_thread_exit_only');
-run_perl(prog => 'use threads 1.67 qw(exit thread_only);' .
+run_perl(prog => 'use threads 1.69 qw(exit thread_only);' .
'threads->create(sub { exit(99); })->join();' .
'exit(86);',
nolib => ($ENV{PERL_CORE}) ? 0 : 1,
is($?>>8, 86, "'use threads 'exit' => 'thread_only'");
}
-my $out = run_perl(prog => 'use threads 1.67;' .
+my $out = run_perl(prog => 'use threads 1.69;' .
'threads->create(sub {' .
' exit(99);' .
'});' .
like($out, '1 finished and unjoined', "exit(status) in thread");
-$out = run_perl(prog => 'use threads 1.67 qw(exit thread_only);' .
+$out = run_perl(prog => 'use threads 1.69 qw(exit thread_only);' .
'threads->create(sub {' .
' threads->set_thread_exit_only(0);' .
' exit(99);' .
like($out, '1 finished and unjoined', "set_thread_exit_only(0)");
-run_perl(prog => 'use threads 1.67;' .
+run_perl(prog => 'use threads 1.69;' .
'threads->create(sub {' .
' $SIG{__WARN__} = sub { exit(99); };' .
' die();' .
}
sub skip {
- ok(1, '# Skipped: ' . $_[0]);
+ ok(1, '# skip: ' . $_[0]);
}
my $not = eval { Config::myconfig() } ? '' : 'not ';
print "${not}ok $test - Are we able to call Config::myconfig after clone\n";
} else {
- print "ok $test # Skip Are we able to call Config::myconfig after clone\n";
+ print "ok $test # skip: Are we able to call Config::myconfig after clone\n";
}
$test++;
}
print $@ =~ /disallowed/
? '' : 'not ', "ok $test # TODO $TODO - unique_hash\n";
} else {
- print("ok $test # Skip $TODO - unique_hash\n");
+ print("ok $test # skip: $TODO - unique_hash\n");
}
$test++;
})->join;
print $@ =~ /^The 'unique' attribute may only be applied to 'our' variables/
? '' : 'not ', "ok $test - $decl\n";
} else {
- print("ok $test # Skip $decl\n");
+ print("ok $test # skip: $decl\n");
}
$test++;
}
chdir 't';
unshift @INC, '../lib';
}
+
+ require($ENV{PERL_CORE} ? "./test.pl" : "./t/test.pl");
+
use Config;
if (! $Config{'useithreads'}) {
- print("1..0 # Skip: Perl not compiled with 'useithreads'\n");
- exit(0);
+ skip_all(q/Perl not compiled with 'useithreads'/);
}
-
- require($ENV{PERL_CORE} ? "./test.pl" : "./t/test.pl");
}
use ExtUtils::testlib;
threads::shared->import();
};
if ($@ || ! $threads::shared::threads_shared) {
- print("1..0 # Skip: threads::shared not available\n");
- exit(0);
+ skip_all('threads::shared not available');
}
$| = 1;
# bugid #24165
-run_perl(prog => 'use threads 1.67;' .
+run_perl(prog => 'use threads 1.69;' .
'sub a{threads->create(shift)} $t = a sub{};' .
'$t->tid; $t->join; $t->tid',
nolib => ($ENV{PERL_CORE}) ? 0 : 1,
use strict;
use warnings;
-our $VERSION = '1.67';
+our $VERSION = '1.69';
my $XS_VERSION = $VERSION;
$VERSION = eval $VERSION;
=head1 VERSION
-This document describes threads version 1.67
+This document describes threads version 1.69
=head1 SYNOPSIS
Returning objects from threads does not work. Depending on the classes
involved, you may be able to work around this by returning a serialized
version of the object (e.g., using L<Data::Dumper> or L<Storable>), and then
-reconstituting it in the joining thread.
+reconstituting it in the joining thread. If you're using Perl 5.10.0 or
+later, and if the class supports L<shared objects|threads::shared/"OBJECTS">,
+you can pass them via L<shared queues| Thread::Queue>.
=item Perl Bugs and the CPAN Version of L<threads>
unreferenced scalars. However, such warnings are harmless, and may safely be
ignored.
+You can search for L<threads> related bug reports at
+L<http://rt.cpan.org/Public/>. If needed submit any new bugs, problems,
+patches, etc. to: L<http://rt.cpan.org/Public/Dist/Display.html?Name=threads>
+
=back
=head1 REQUIREMENTS
L<http://www.cpanforum.com/dist/threads>
Annotated POD for L<threads>:
-L<http://annocpan.org/~JDHEDDEN/threads-1.67/threads.pm>
+L<http://annocpan.org/~JDHEDDEN/threads-1.69/threads.pm>
Source repository:
L<http://code.google.com/p/threads-shared/>
thread = S_SV_to_ithread(aTHX_ ST(0));
ST(0) = ((thread->gimme & G_WANT) == G_ARRAY) ? &PL_sv_yes :
((thread->gimme & G_WANT) == G_VOID) ? &PL_sv_undef
- /* G_SCALAR */ : &PL_sv_no;
+ /* G_SCALAR */ : &PL_sv_no;
/* XSRETURN(1); - implied */