From 3f3b8cf8257823a1a647927f5c7ef91b4bebecec Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Wed, 8 Jan 2025 03:00:41 -0500 Subject: [PATCH] tests: Localize config setting This isn't strictly necessary, but is good practice because it guarantees that the config is cleaned up after each test case. --- t/ssl-validate.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/ssl-validate.pl b/t/ssl-validate.pl index 5939dd9..bc7553a 100644 --- a/t/ssl-validate.pl +++ b/t/ssl-validate.pl @@ -73,7 +73,7 @@ for my $tc (@test_cases) { SKIP: { skip("IPv6 not supported on this system", 1) if $tc->{ipv6} && !$ipv6_supported; skip("HTTP::Daemon too old for IPv6 support", 1) if $tc->{ipv6} && !$httpd_ipv6_supported; - $ddclient::config{$h} = $tc->{cfg}; + local $ddclient::config{$h} = $tc->{cfg}; %ddclient::config if 0; # suppress spurious warning "Name used only once: possible typo" is(ddclient::get_ipv4(ddclient::strategy_inputs('usev4', $h)), $tc->{want}, $tc->{desc}) if ($tc->{cfg}{usev4});