From 964e99a830550c41d3acb5ede581272076c22a61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C5=8Dan?= Date: Sun, 29 Mar 2026 05:43:45 -0600 Subject: [PATCH] fix: handle Test2::Harness::Util::IPC deprecation in test helper Test2::Harness::Util::IPC was deprecated and replaced by Test2::Harness::IPC::Util in newer versions. On cpanel-perl 5.42, the deprecated module dies at compile time, causing import.t, plugin.t, and trace.t to fail. Try the new module first, fall back to the old one. Closes #325 Co-Authored-By: Claude Opus 4.6 --- t/lib/Test/TMF.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/t/lib/Test/TMF.pm b/t/lib/Test/TMF.pm index 2c60d9a4..6737822f 100644 --- a/t/lib/Test/TMF.pm +++ b/t/lib/Test/TMF.pm @@ -18,7 +18,12 @@ use Fcntl qw/SEEK_CUR/; use Cwd 'abs_path'; -use Test2::Harness::Util::IPC qw/run_cmd/; +BEGIN { + # Test2::Harness::Util::IPC was deprecated in favor of Test2::Harness::IPC::Util + eval { require Test2::Harness::IPC::Util; Test2::Harness::IPC::Util->import('run_cmd'); 1 } + or eval { require Test2::Harness::Util::IPC; Test2::Harness::Util::IPC->import('run_cmd'); 1 } + or die "Cannot load Test2::Harness::IPC::Util or Test2::Harness::Util::IPC: $@"; +} use Exporter 'import'; our @EXPORT = qw{