From 14926269ec6e8e9bf0c50d77d3552fb495e9e5d3 Mon Sep 17 00:00:00 2001 From: Max Carrara Date: Fri, 2 Aug 2024 15:26:41 +0200 Subject: [PATCH] pbs client: use post-if definedness checks instead of '//=' operator Signed-off-by: Max Carrara --- src/PVE/PBSClient.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PVE/PBSClient.pm b/src/PVE/PBSClient.pm index 3e98dd1..525b37f 100644 --- a/src/PVE/PBSClient.pm +++ b/src/PVE/PBSClient.pm @@ -208,7 +208,7 @@ my sub run_client_cmd : prototype($$;$$$$) { my $json_str = ''; my $outfunc = sub { $json_str .= "$_[0]\n" }; - $binary //= 'proxmox-backup-client'; + $binary = 'proxmox-backup-client' if !defined($binary); $param = [] if !defined($param); $param = [ $param ] if !ref($param); @@ -286,7 +286,7 @@ sub backup_fs_tree { '--backup-id', $id, ]; - $cmd_opts //= {}; + $cmd_opts = {} if !defined($cmd_opts); $cmd_opts->{namespace} = $self->{scfg}->{namespace} if defined($self->{scfg}->{namespace}); @@ -308,7 +308,7 @@ sub restore_pxar { "$target", "--allow-existing-dirs", 0, ]; - $cmd_opts //= {}; + $cmd_opts = {} if !defined($cmd_opts); $cmd_opts->{namespace} = $namespace;