From 03ad24829c1e7455836b2bee1f1daddb21b6d1bb Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Tue, 14 May 2024 18:33:05 -0400 Subject: [PATCH] Fix "Scalar value better written as" warning Also some readability improvements. --- ddclient.in | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ddclient.in b/ddclient.in index fa3780a..49e032f 100755 --- a/ddclient.in +++ b/ddclient.in @@ -4237,10 +4237,12 @@ sub nic_dnsexit2_update { info("Going to update IPv$ipv address to %s for %s.", $ip, $h); $config{$h}{'status-ipv$ipv'} = 'failed'; - - # One key per ipv (4 or 6) - my %payload = (name => $h, type => $type, content => $ip, ttl => $config{$h}{'ttl'}); - @total_payload{$ipv} = \%payload; + $total_payload{$ipv} = { + name => $h, + type => $type, + content => $ip, + ttl => $config{$h}{'ttl'}, + }; }; # Set the URL of the API endpoint my $url = "https://$config{$h}{'server'}$config{$h}{'path'}";