From e14ddff90481cc916961cad719d1b168ad359fe7 Mon Sep 17 00:00:00 2001 From: smutel Date: Thu, 19 May 2016 17:10:48 +0200 Subject: [PATCH] Avoid deprecated message from perl Use of implicit split to @_ is deprecated at /tmp/mysqltuner.pl line 3243 (#1) (D deprecated, W syntax) It makes a lot of work for the compiler when you clobber a subroutine's argument list, so it's better if you assign the results of a split() explicitly to an array (or list). --- mysqltuner.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mysqltuner.pl b/mysqltuner.pl index b0e2159..4e2ae62 100755 --- a/mysqltuner.pl +++ b/mysqltuner.pl @@ -3240,7 +3240,8 @@ sub mariadb_galera { { goodprint "Galera Cluster address is defined: " . $myvar{'wsrep_cluster_address'}; - my $nbNodes = scalar( split /,/, $myvar{'wsrep_cluster_address'} ); + my @NodesTmp = split /,/, $myvar{'wsrep_cluster_address'}; + my $nbNodes = @NodesTmp; infoprint "There are $nbNodes nodes in wsrep_cluster_address"; my $nbNodesSize = trim( $mystat{'wsrep_cluster_size'} ); if ( $nbNodesSize == 3 or $nbNodesSize == 5 ) {