Skip to content

Commit

Permalink
allow some basic infrastructure to load with -Dusedefaultstrict
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tonycoz committed Jan 4, 2024
1 parent 06c1b78 commit afe3e67
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion TestInit.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion regen/embed_lib.pl
Original file line number Diff line number Diff line change
@@ -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") {
Expand Down
6 changes: 3 additions & 3 deletions t/test.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,7 @@ sub _num_to_alpha {
my %tmpfiles;
sub unlink_tempfiles {
unlink_all keys %tmpfiles;
%tempfiles = ();
%tmpfiles = ();
}

END { unlink_tempfiles(); }
Expand Down Expand Up @@ -1796,11 +1796,11 @@ ($;$)
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);
Expand Down

0 comments on commit afe3e67

Please sign in to comment.