Merge pull request #236 from rhansen/caller-undef-warning

Silence warning when calling `geturl` from an anonymous sub
This commit is contained in:
Sandro 2020-07-06 00:25:18 +02:00 committed by GitHub
commit cf34c21135
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2007,7 +2007,7 @@ sub geturl {
opt('fw') && debug("opt(fw = %s)", opt('fw')); opt('fw') && debug("opt(fw = %s)", opt('fw'));
$globals{'fw'} && debug("glo fw = %s", $globals{'fw'}); $globals{'fw'} && debug("glo fw = %s", $globals{'fw'});
## always omit SSL for connections to local router ## always omit SSL for connections to local router
if ($force_ssl || ($globals{'ssl'} and (caller(1))[3] ne 'main::get_ip')) { if ($force_ssl || ($globals{'ssl'} && ((caller(1))[3] // '') ne 'main::get_ip')) {
$use_ssl = 1; $use_ssl = 1;
$default_port = '443'; $default_port = '443';
} else { } else {