allow some basic infrastructure to load with -Dusedefaultstrict

The changes to t/test.pl appear to be real bugs.

This allows `make test_harness` to run, but many tests will still
fail under -Dusedefaultstrict

This addresses #21732 but does not fix it.  I'm unsure how
supported that build option is.
This commit is contained in:
Tony Cook 2023-12-20 14:58:05 +11:00
parent 06c1b785f4
commit afe3e67fb0
3 changed files with 5 additions and 5 deletions

View File

@ -37,7 +37,7 @@
package TestInit;
$VERSION = 1.04;
our $VERSION = 1.05;
# Let tests know they're running in the perl core. Useful for modules
# which live dual lives on CPAN.

View File

@ -1,6 +1,6 @@
#!/usr/bin/perl -w
BEGIN {
for $n (qw(lib regen)) {
for my $n (qw(lib regen)) {
if (-e "../$n") {
push @INC, "../$n";
} elsif (-e "./$n") {

View File

@ -1014,7 +1014,7 @@ sub _num_to_alpha {
my %tmpfiles;
sub unlink_tempfiles {
unlink_all keys %tmpfiles;
%tempfiles = ();
%tmpfiles = ();
}
END { unlink_tempfiles(); }
@ -1796,11 +1796,11 @@ sub watchdog ($;$)
if ($timeout == 0) {
if ($watchdog_thread) {
$watchdog_thread->kill('KILL');
undef $watch_dog_thread;
undef $watchdog_thread;
}
elsif ($watchdog) {
kill('KILL', $watchdog);
undef $watch_dog;
undef $watchdog;
}
else {
alarm(0);