Commit f9bdd9da8d for perl
commit f9bdd9da8d04434ac94ad5992920a6e3264b8877
Author: Tony Cook <tony@develop-help.com>
Date: Thu Aug 27 16:15:03 2026 +1000
Config::DEBUGGING: update t/* tests and mktables to use the new sub
diff --git a/charclass_invlists.inc b/charclass_invlists.inc
index 5144f1dcff..9c9a5dd869 100644
--- a/charclass_invlists.inc
+++ b/charclass_invlists.inc
@@ -502812,7 +502812,7 @@ static const U8 WB_dfa_table[] = {
* e015a6d4bde8dd0f8b72bf15ac9a4f588146ce6bc0bf8980e9dae8302cdbdc28 lib/unicore/extracted/DLineBreak.txt
* 3dade4d96bd00d71b10022bf70b370090f3ca947f977ad4dc2854e06c4d074f6 lib/unicore/extracted/DNumType.txt
* c84f084f83ec6852e1db6e7ef15f340a3af2df8cf0c386ac0d076c2cebd189e6 lib/unicore/extracted/DNumValues.txt
- * 9931e372f6528f37dccad70cc9280a6a0fcb3b9afd08eba16f212360881c4ffd lib/unicore/mktables
+ * 94644b4e53ef4f2590ef86a261dcd22ffadf79247fcc7f31c4ebf5b19111fd25 lib/unicore/mktables
* a0079d7556b20c2de1fdc3d492797a91b8ec8a06006f94460006185cb6380962 lib/unicore/version
* 0a6b5ab33bb1026531f816efe81aea1a8ffcd34a27cbea37dd6a70a63d73c844 regen/charset_translations.pl
* 6bbb462516a4ea79e28d58cf387f0b4b63ba83c7d381cd61bdda0b188e148082 regen/mk_PL_charclass.pl
diff --git a/lib/unicore/mktables b/lib/unicore/mktables
index ef9751b59e..e1bc9cb398 100644
--- a/lib/unicore/mktables
+++ b/lib/unicore/mktables
@@ -54,7 +54,7 @@ no warnings qw( experimental::builtin );
sub DEBUG () { 0 } # Set to 0 for production; 1 for development
$| = 1 if DEBUG;
-my $debugging_build = $Config{"ccflags"} =~ /-DDEBUGGING/;
+my $debugging_build = Config::DEBUGGING;
sub NON_ASCII_PLATFORM { ord("A") != 65 }
diff --git a/lib/unicore/uni_keywords.pl b/lib/unicore/uni_keywords.pl
index 485fc990b3..5cd6168c34 100644
--- a/lib/unicore/uni_keywords.pl
+++ b/lib/unicore/uni_keywords.pl
@@ -1451,7 +1451,7 @@
# e015a6d4bde8dd0f8b72bf15ac9a4f588146ce6bc0bf8980e9dae8302cdbdc28 lib/unicore/extracted/DLineBreak.txt
# 3dade4d96bd00d71b10022bf70b370090f3ca947f977ad4dc2854e06c4d074f6 lib/unicore/extracted/DNumType.txt
# c84f084f83ec6852e1db6e7ef15f340a3af2df8cf0c386ac0d076c2cebd189e6 lib/unicore/extracted/DNumValues.txt
-# 9931e372f6528f37dccad70cc9280a6a0fcb3b9afd08eba16f212360881c4ffd lib/unicore/mktables
+# 94644b4e53ef4f2590ef86a261dcd22ffadf79247fcc7f31c4ebf5b19111fd25 lib/unicore/mktables
# a0079d7556b20c2de1fdc3d492797a91b8ec8a06006f94460006185cb6380962 lib/unicore/version
# 0a6b5ab33bb1026531f816efe81aea1a8ffcd34a27cbea37dd6a70a63d73c844 regen/charset_translations.pl
# 6bbb462516a4ea79e28d58cf387f0b4b63ba83c7d381cd61bdda0b188e148082 regen/mk_PL_charclass.pl
diff --git a/regcharclass.h b/regcharclass.h
index 695f28741d..a0ea4a680e 100644
--- a/regcharclass.h
+++ b/regcharclass.h
@@ -4000,7 +4000,7 @@
* e015a6d4bde8dd0f8b72bf15ac9a4f588146ce6bc0bf8980e9dae8302cdbdc28 lib/unicore/extracted/DLineBreak.txt
* 3dade4d96bd00d71b10022bf70b370090f3ca947f977ad4dc2854e06c4d074f6 lib/unicore/extracted/DNumType.txt
* c84f084f83ec6852e1db6e7ef15f340a3af2df8cf0c386ac0d076c2cebd189e6 lib/unicore/extracted/DNumValues.txt
- * 9931e372f6528f37dccad70cc9280a6a0fcb3b9afd08eba16f212360881c4ffd lib/unicore/mktables
+ * 94644b4e53ef4f2590ef86a261dcd22ffadf79247fcc7f31c4ebf5b19111fd25 lib/unicore/mktables
* a0079d7556b20c2de1fdc3d492797a91b8ec8a06006f94460006185cb6380962 lib/unicore/version
* 0a6b5ab33bb1026531f816efe81aea1a8ffcd34a27cbea37dd6a70a63d73c844 regen/charset_translations.pl
* cad98ca9e7be21f5f2a127f4f6304302e3ea1de98295124986eabd91ab2e9643 regen/regcharclass.pl
diff --git a/regexp_constants.h b/regexp_constants.h
index cc2d3db95d..8cffe32cd2 100644
--- a/regexp_constants.h
+++ b/regexp_constants.h
@@ -83,7 +83,7 @@
* e015a6d4bde8dd0f8b72bf15ac9a4f588146ce6bc0bf8980e9dae8302cdbdc28 lib/unicore/extracted/DLineBreak.txt
* 3dade4d96bd00d71b10022bf70b370090f3ca947f977ad4dc2854e06c4d074f6 lib/unicore/extracted/DNumType.txt
* c84f084f83ec6852e1db6e7ef15f340a3af2df8cf0c386ac0d076c2cebd189e6 lib/unicore/extracted/DNumValues.txt
- * 9931e372f6528f37dccad70cc9280a6a0fcb3b9afd08eba16f212360881c4ffd lib/unicore/mktables
+ * 94644b4e53ef4f2590ef86a261dcd22ffadf79247fcc7f31c4ebf5b19111fd25 lib/unicore/mktables
* a0079d7556b20c2de1fdc3d492797a91b8ec8a06006f94460006185cb6380962 lib/unicore/version
* 0a6b5ab33bb1026531f816efe81aea1a8ffcd34a27cbea37dd6a70a63d73c844 regen/charset_translations.pl
* 6bbb462516a4ea79e28d58cf387f0b4b63ba83c7d381cd61bdda0b188e148082 regen/mk_PL_charclass.pl
diff --git a/t/op/aassign.t b/t/op/aassign.t
index 7ba9591821..6e74a4eeb0 100644
--- a/t/op/aassign.t
+++ b/t/op/aassign.t
@@ -270,10 +270,10 @@ sub sh {
# mark it as safe even though it isn't really. Hence it's a TODO.
SKIP: {
- use Config;
+ eval { require Config; 1 }
+ or skip "Cannot load Config: $@";
# debugging builds will detect this failure and panic
- skip "DEBUGGING build" if $::Config{ccflags} =~ /(?<!\S)-DDEBUGGING(?!\S)/
- or $^O eq 'VMS' && $::Config{usedebugging_perl} eq 'Y';
+ skip "DEBUGGING build" if Config::DEBUGGING();
local $::TODO = 'cheat and optimise my (....) = @_';
local @_ = 1..3;
&f17;
diff --git a/t/op/glob.t b/t/op/glob.t
index 8b6ca8fe0a..2fcefce7fe 100644
--- a/t/op/glob.t
+++ b/t/op/glob.t
@@ -7,7 +7,6 @@ BEGIN {
}
use Config;
-my $is_debugging_build = $Config{config_args} =~ /\bDDEBUGGING\b(*nla:=none)/;
@oops = @ops = <op/*>;
@@ -155,7 +154,7 @@ SKIP: {
skip "Debugging builds on Linux and Cygwin still problematic: GH 16869", 1
if (
($Config{osname} eq 'linux' or $Config{osname} eq 'cygwin') and
- $is_debugging_build
+ Config::DEBUGGING
);
fresh_perl(<<~'HERE', {});
my $glob = ("0" x 4094) . "?";
diff --git a/t/porting/bincompat.t b/t/porting/bincompat.t
index e8bc2f0c05..d3628797cc 100644
--- a/t/porting/bincompat.t
+++ b/t/porting/bincompat.t
@@ -55,7 +55,7 @@ while (my ($index, $sub) = each @to_check) {
is("@strs","@sorted_strs", "Strings are sorted for $var[$index] in $file[$index]");
}
-my $v_is_debugging = !!grep /\bDEBUGGING\b/, @V[0, 1];
-is(Internals::DEBUGGING, $v_is_debugging, "check Internals::DEBUGGING");
+my $v_is_debugging = !!grep /\bDEBUGGING\b/, $V[1];
+is(Config::DEBUGGING, $v_is_debugging, "check Config::DEBUGGING");
done_testing();
diff --git a/t/run/switchDx.t b/t/run/switchDx.t
index e59e556034..5c28b358d5 100644
--- a/t/run/switchDx.t
+++ b/t/run/switchDx.t
@@ -11,8 +11,7 @@ use Config;
my $perlio_log = "perlio$$.txt";
skip_all "DEBUGGING build required"
- unless $::Config{ccflags} =~ /(?<!\S)-DDEBUGGING(?!\S)/
- or $^O eq 'VMS' && $::Config{usedebugging_perl} eq 'Y';
+ unless Config::DEBUGGING;
plan tests => 9;
diff --git a/t/run/todo.t b/t/run/todo.t
index c3756912bd..9e6d1d616b 100644
--- a/t/run/todo.t
+++ b/t/run/todo.t
@@ -103,8 +103,6 @@ use warnings;
my $switches = "";
-my $is_debugging_build = $Config{config_args} =~ /\bDDEBUGGING\b(*nla:=none)/;
-
our $TODO;
TODO: {
@@ -294,7 +292,7 @@ TODO: {
}
TODO: {
- todo_skip "Test needs -DDEBUGGING", 1 unless $is_debugging_build;
+ todo_skip "Test needs -DDEBUGGING", 1 unless Config::DEBUGGING;
local $::TODO = 'GH 16522';
fresh_perl(<<~'HERE', { stderr => 'devnull' });
END { exit 0 } # Consider compilation errors a success
@@ -304,7 +302,7 @@ TODO: {
}
TODO: {
- todo_skip "Test needs -DDEBUGGING", 1 unless $is_debugging_build;
+ todo_skip "Test needs -DDEBUGGING", 1 unless Config::DEBUGGING;
local $::TODO = 'GH 16863';
fresh_perl(<<~'HERE', { stderr => 'devnull' });
END { exit 0 }
@@ -322,7 +320,7 @@ TODO: {
TODO: {
todo_skip "Test needs -DDEBUGGING on Linux and on Cygwin, no miniperl", 1
unless (
- $is_debugging_build and
+ Config::DEBUGGING and
($Config{osname} eq 'linux' or $Config{osname} eq 'cygwin') and
! is_miniperl()
);
@@ -335,7 +333,7 @@ TODO: {
}
TODO: {
- todo_skip "Test needs -DDEBUGGING", 1 unless $is_debugging_build;
+ todo_skip "Test needs -DDEBUGGING", 1 unless Config::DEBUGGING;
local $::TODO = 'GH 16876';
fresh_perl('$_ = "a"; s{ x | (?{ s{}{x} }) }{}gx;',
{ stderr => 'devnull' });
diff --git a/t/win32/system_tests b/t/win32/system_tests
index 91113dbf0b..97db80e693 100644
--- a/t/win32/system_tests
+++ b/t/win32/system_tests
@@ -100,7 +100,7 @@ for my $cmds (@commands) {
">\n";
if (system(@cmds,@args) != 0) {
print "Failed, status($?)\n";
- if ($Config{ccflags} =~ /\bDDEBUGGING\b/) {
+ if (Config::DEBUGGING) {
print "Running again in debug mode\n";
$^D = 1; # -Dp
system(@cmds,@args);
@@ -112,7 +112,7 @@ for my $cmds (@commands) {
note "####### '$cmdstr'";
if (system($cmdstr) != 0) {
print "Failed, status($?)\n";
- if ($Config{ccflags} =~ /\bDDEBUGGING\b/) {
+ if (Config::DEBUGGING) {
print "Running again in debug mode\n";
$^D = 1; # -Dp
system($cmdstr);
diff --git a/uni_keywords.h b/uni_keywords.h
index 83c08b9941..e3689c85aa 100644
--- a/uni_keywords.h
+++ b/uni_keywords.h
@@ -8285,7 +8285,7 @@ match_uniprop( const unsigned char * const key, const U16 key_len ) {
* e015a6d4bde8dd0f8b72bf15ac9a4f588146ce6bc0bf8980e9dae8302cdbdc28 lib/unicore/extracted/DLineBreak.txt
* 3dade4d96bd00d71b10022bf70b370090f3ca947f977ad4dc2854e06c4d074f6 lib/unicore/extracted/DNumType.txt
* c84f084f83ec6852e1db6e7ef15f340a3af2df8cf0c386ac0d076c2cebd189e6 lib/unicore/extracted/DNumValues.txt
- * 9931e372f6528f37dccad70cc9280a6a0fcb3b9afd08eba16f212360881c4ffd lib/unicore/mktables
+ * 94644b4e53ef4f2590ef86a261dcd22ffadf79247fcc7f31c4ebf5b19111fd25 lib/unicore/mktables
* a0079d7556b20c2de1fdc3d492797a91b8ec8a06006f94460006185cb6380962 lib/unicore/version
* 0a6b5ab33bb1026531f816efe81aea1a8ffcd34a27cbea37dd6a70a63d73c844 regen/charset_translations.pl
* 6bbb462516a4ea79e28d58cf387f0b4b63ba83c7d381cd61bdda0b188e148082 regen/mk_PL_charclass.pl