From fee2ece3107134bccd7758c16d6de3e41dc68612 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Wed, 19 Feb 2020 14:50:04 +0100 Subject: [PATCH] use one liner closure for outfunc Signed-off-by: Thomas Lamprecht --- PVE/Storage/PBSPlugin.pm | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/PVE/Storage/PBSPlugin.pm b/PVE/Storage/PBSPlugin.pm index 4521314..2ac9ea0 100644 --- a/PVE/Storage/PBSPlugin.pm +++ b/PVE/Storage/PBSPlugin.pm @@ -121,11 +121,7 @@ sub run_client_cmd { my ($scfg, $storeid, $client_cmd, $param, $no_output) = @_; my $json_str = ''; - - my $outfunc = sub { - my $line = shift; - $json_str .= "$line\n"; - }; + my $outfunc = sub { $json_str .= "$_[0]\n" }; $param = [] if !defined($param); $param = [ $param ] if !ref($param); @@ -150,11 +146,7 @@ sub extract_vzdump_config { my ($vtype, $name, $vmid, undef, undef, undef, $format) = $class->parse_volname($volname); my $config = ''; - - my $outfunc = sub { - my $line = shift; - $config .= "$line\n"; - }; + my $outfunc = sub { $config .= "$_[0]\n" }; my $config_name; if ($format eq 'pbs-vm') {