use Scalar::Util qw(reftype refaddr blessed);
-our $VERSION = '1.21';
+our $VERSION = '1.22';
my $XS_VERSION = $VERSION;
$VERSION = eval $VERSION;
=head1 VERSION
-This document describes threads::shared version 1.21
+This document describes threads::shared version 1.22
=head1 SYNOPSIS
L<http://www.cpanforum.com/dist/threads-shared>
Annotated POD for L<threads::shared>:
-L<http://annocpan.org/~JDHEDDEN/threads-shared-1.21/shared.pm>
+L<http://annocpan.org/~JDHEDDEN/threads-shared-1.22/shared.pm>
Source repository:
L<http://code.google.com/p/threads-shared/>
Artur Bergman E<lt>sky AT crucially DOT netE<gt>
-threads::shared is released under the same license as Perl.
-
Documentation borrowed from the old Thread.pm.
CPAN version produced by Jerry D. Hedden E<lt>jdhedden AT cpan DOT orgE<gt>.
+=head1 LICENSE
+
+threads::shared is released under the same license as Perl.
+
=cut
share(\%hash);
hash(24, 42, 'Thing');
+exit(0);
+
# EOF
}
use Config;
if (! $Config{'useithreads'}) {
- print("1..0 # Skip: Perl not compiled with 'useithreads'\n");
+ print("1..0 # SKIP Perl not compiled with 'useithreads'\n");
exit(0);
}
}
my $x :shared;
ok(14, is_shared($x), "Check for sharing");
+exit(0);
+
# EOF
}
use Config;
if (! $Config{'useithreads'}) {
- print("1..0 # Skip: Perl not compiled with 'useithreads'\n");
+ print("1..0 # SKIP Perl not compiled with 'useithreads'\n");
exit(0);
}
}
ok(44, is_shared(@foo), "Check for sharing");
+exit(0);
+
# EOF
}
use Config;
if (! $Config{'useithreads'}) {
- print("1..0 # Skip: Perl not compiled with 'useithreads'\n");
+ print("1..0 # SKIP Perl not compiled with 'useithreads'\n");
exit(0);
}
}
ok(36, ref($$hobj{'scalar'}) eq 'zab', "reblessed scalar in hash");
ok(37, ${$$hobj{'scalar'}} eq 'test', "reblessed scalar in hash contents");
+exit(0);
+
# EOF
}
use Config;
if (! $Config{'useithreads'}) {
- print("1..0 # Skip: Perl not compiled with 'useithreads'\n");
+ print("1..0 # SKIP Perl not compiled with 'useithreads'\n");
exit(0);
}
}
ok($test++, $$hsh{'foo'}[1] eq 'bar', 'Cloned structure');
}
+exit(0);
+
# EOF
}
use Config;
if (! $Config{'useithreads'}) {
- print("1..0 # Skip: Perl not compiled with 'useithreads'\n");
+ print("1..0 # SKIP Perl not compiled with 'useithreads'\n");
exit(0);
}
}
$Base += 4;
}
+exit(0);
+
# EOF
ok( "@array", "1 2 3 4" );
}
+exit(0);
+
# EOF
}
use Config;
if (! $Config{'useithreads'}) {
- print("1..0 # Skip: Perl not compiled with 'useithreads'\n");
+ print("1..0 # SKIP Perl not compiled with 'useithreads'\n");
exit(0);
}
}
ok(19, is_shared($foo), "Check for sharing");
ok(20, is_shared(%foo), "Check for sharing");
+exit(0);
+
# EOF
}
use Config;
if (! $Config{'useithreads'}) {
- print("1..0 # Skip: Perl not compiled with 'useithreads'\n");
+ print("1..0 # SKIP Perl not compiled with 'useithreads'\n");
exit(0);
}
}
ok(16, is_shared(%hash), "Check for sharing");
+exit(0);
+
# EOF
}
use Config;
if (! $Config{'useithreads'}) {
- print("1..0 # Skip: Perl not compiled with 'useithreads'\n");
+ print("1..0 # SKIP Perl not compiled with 'useithreads'\n");
exit(0);
}
}
ok(6, ! is_shared($test), "Check for sharing");
+exit(0);
+
# EOF
}
use Config;
if (! $Config{'useithreads'}) {
- print("1..0 # Skip: Perl not compiled with 'useithreads'\n");
+ print("1..0 # SKIP Perl not compiled with 'useithreads'\n");
exit(0);
}
if ($] < 5.010) {
- print("1..0 # Skip: Needs Perl 5.10.0 or later\n");
+ print("1..0 # SKIP Needs Perl 5.10.0 or later\n");
exit(0);
}
}
ok($$obj == 2, "Main: New object ID $$obj # TODO - should be 2");
+exit(0);
+
# EOF
}
use Config;
if (! $Config{'useithreads'}) {
- print("1..0 # Skip: Perl not compiled with 'useithreads'\n");
+ print("1..0 # SKIP Perl not compiled with 'useithreads'\n");
exit(0);
}
}
ok($test_count++, $str1 eq $str2, 'contents');
}
+exit(0);
+
# EOF
}
use Config;
if (! $Config{'useithreads'}) {
- print("1..0 # Skip: Perl not compiled with 'useithreads'\n");
+ print("1..0 # SKIP Perl not compiled with 'useithreads'\n");
exit(0);
}
if ($^O eq 'hpux' && $Config{osvers} <= 10.20) {
- print("1..0 # Skip: Broken under HP-UX 10.20\n");
+ print("1..0 # SKIP Broken under HP-UX 10.20\n");
exit(0);
}
}
}
}
+exit(0);
+
# EOF
}
use Config;
if (! $Config{'useithreads'}) {
- print("1..0 # Skip: Perl not compiled with 'useithreads'\n");
+ print("1..0 # SKIP Perl not compiled with 'useithreads'\n");
exit(0);
}
}
ok(21, is_shared($w) == is_shared($$$$w), '_id($w) == _id($$$$w)');
}
+exit(0);
+
# EOF
}
use Config;
if (! $Config{'useithreads'}) {
- print("1..0 # Skip: Perl not compiled with 'useithreads'\n");
+ print("1..0 # SKIP Perl not compiled with 'useithreads'\n");
exit(0);
}
}
ok(11, is_shared($test), "Check for sharing");
+exit(0);
+
# EOF
}
use Config;
if (! $Config{'useithreads'}) {
- print("1..0 # Skip: Perl not compiled with 'useithreads'\n");
+ print("1..0 # SKIP Perl not compiled with 'useithreads'\n");
exit(0);
}
}
} # -- SYNCH_REFS block
+exit(0);
+
# EOF
}
use Config;
if (! $Config{'useithreads'}) {
- print("1..0 # Skip: Perl not compiled with 'useithreads'\n");
+ print("1..0 # SKIP Perl not compiled with 'useithreads'\n");
exit(0);
}
eval {
Time::HiRes->import('time');
};
if ($@) {
- print("1..0 # Skip: Time::HiRes not available.\n");
+ print("1..0 # SKIP Time::HiRes not available.\n");
exit(0);
}
}
} # -- SYNCH_REFS block
+exit(0);
+
# EOF