From the documentation for `vars`:
> NOTE: For use with variables in the current package for a single
> scope, the functionality provided by this pragma has been superseded
> by "our" declarations, available in Perl v5.6.0 or later, and use of
> this pragma is discouraged.
https://kb.easydns.com/knowledge/dynamic-dns/ doesn't say anything
about repeating the `myip` parameter, or that both IPv4 and IPv6
addresses can be included in the same `myip` parameter.
Unfortunately it also doesn't say whether updating the IPv4 address
alone will nuke the IPv6 AAAA record, or whether updating the IPv6
address alone will nuke the IPv4 A record (like Google Domains used to
do). Here's hoping that the A and AAAA records are truly independent.
Before:
* `$scale` was ignored causing it to set `wtime` to 5s in the
future, which is too brief. Fortunately, `min-error-interval`
applied which prevented overly aggressive retries.
* The lack of call to `failed` meant that `$result` was not set to
"FAILED" and thus `mail-failure` recipients were not emailed.
Now `TOOSOON` is treated like any other error and will result in a
retry after `min-error-interval` (default: 5m).
* Consistently use just the hostname as the log message prefix.
* Delete redundant verbose log message.
* Log IPv4 and IPv6 separately in case `$ipv4` or `$ipv6` is
`undef`.
* Don't log the full line when a known error result is returned.
* For unknown results, don't wrap the line in parentheses.
* Use string interpolation for readability.
* Use a bulleted list instead of a numbered list
* Fix indentation
* Fix formatting
* Replace `fw` with `fwv4`
* Suggest `curl` instead of `ddclient --geturl`
* etc.
It's initialized to a non-'good' value before the function is called,
and ddclient doesn't distinguish between different non-good values, so
it is sufficient to leave it alone.
It doesn't make sense to continue processing if the response body
can't be parsed. Maybe GoDaddy returned 200 and there's a bug in the
body parsing logic, in which case the `bad` result should actually be
`good`. But it's better to assume that the update wasn't saved, in
case the server returns 200 with a JSON object that semantically means
"failed to update".