From 1fe458450716fb698a2e55c2d9569fe204cf7a61 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Wed, 9 Oct 2019 19:20:26 +0200 Subject: [PATCH] TT#68300 Use // operator instead of || when checking for definedness We should check whether these have been define, not whether they evaluate to false. Change-Id: I7bb5e3d882055df94a95134f85375e87d2baa5fe --- lib/NGCP/API/Client.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/NGCP/API/Client.pm b/lib/NGCP/API/Client.pm index 9498ca3..157d210 100644 --- a/lib/NGCP/API/Client.pm +++ b/lib/NGCP/API/Client.pm @@ -23,9 +23,9 @@ sub _load_config_defaults { host => $cfg->{_}->{NGCP_API_IP}, port => $cfg->{_}->{NGCP_API_PORT}, iface => $cfg->{_}->{NGCP_API_IFACE}, - sslverify => $cfg->{_}->{NGCP_API_SSLVERIFY} || 'yes', - sslverify_lb => $cfg->{_}->{NGCP_API_SSLVERIFY_LOOPBACK} || 'no', - read_timeout => $cfg->{_}->{NGCP_API_READ_TIMEOUT} || 180, + sslverify => $cfg->{_}->{NGCP_API_SSLVERIFY} // 'yes', + sslverify_lb => $cfg->{_}->{NGCP_API_SSLVERIFY_LOOPBACK} // 'no', + read_timeout => $cfg->{_}->{NGCP_API_READ_TIMEOUT} // 180, page_rows => $cfg->{_}->{NGCP_API_PAGE_ROWS} // 10, auth_user => $cfg->{_}->{AUTH_SYSTEM_LOGIN}, auth_pass => $cfg->{_}->{AUTH_SYSTEM_PASSWORD}, @@ -181,7 +181,7 @@ sub set_page_rows { sub set_verbose { my $self = shift; - $self->{_opts}{verbose} = shift || 0; + $self->{_opts}{verbose} = shift // 0; return; }