This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Inline sv_cmp() and sv_cmp_locale() as macros wrapping their flags variants.
[perl5.git] / dist / threads / lib / threads.pm
1 package threads;
2
3 use 5.008;
4
5 use strict;
6 use warnings;
7
8 our $VERSION = '1.81_01';
9 my $XS_VERSION = $VERSION;
10 $VERSION = eval $VERSION;
11
12 # Verify this Perl supports threads
13 require Config;
14 if (! $Config::Config{useithreads}) {
15     die("This Perl not built to support threads\n");
16 }
17
18 # Complain if 'threads' is loaded after 'threads::shared'
19 if ($threads::shared::threads_shared) {
20     warn <<'_MSG_';
21 Warning, threads::shared has already been loaded.  To
22 enable shared variables, 'use threads' must be called
23 before threads::shared or any module that uses it.
24 _MSG_
25 }
26
27 # Declare that we have been loaded
28 $threads::threads = 1;
29
30 # Load the XS code
31 require XSLoader;
32 XSLoader::load('threads', $XS_VERSION);
33
34