skip_all 'perl 5.13.4 required to test thread safety'
unless $force or "$]" >= 5.013_004;
+ if (($INC{'Test/More.pm'} || $INC{'Test/Leaner.pm'}) && !$INC{'threads.pm'}) {
+ die 'Test::More/Test::Leaner was loaded too soon';
+ }
+
load_or_skip_all 'threads', $force ? '0' : '1.67', [ ];
load_or_skip_all 'threads::shared', $force ? '0' : '1.14', [ ];
--- /dev/null
+#!perl -T
+
+use strict;
+use warnings;
+
+BEGIN { $ENV{PERL_FORCE_TEST_THREADS} = 1 }
+
+use Test::More tests => 1;
+
+local $@;
+eval 'use VPIT::TestHelpers "threads";';
+like $@, qr/was loaded too soon/, 'cannot use the threads feature after Test::More was loaded';