check_mysql_health icon indicating copy to clipboard operation
check_mysql_health copied to clipboard

Use of qw(...) as parentheses is deprecated

Open aversag opened this issue 9 years ago • 3 comments

hello,

I get these warnings when running the script to check for remote MySQL host :

Use of qw(...) as parentheses is deprecated at /usr/lib/nagios/plugins/check_mysql_health line 1259. Use of qw(...) as parentheses is deprecated at /usr/lib/nagios/plugins/check_mysql_health line 2665. Use of qw(...) as parentheses is deprecated at /usr/lib/nagios/plugins/check_mysql_health line 3614.

thank you for your work

aversag avatar Apr 13 '15 07:04 aversag

This project looks quite dead but just to whom it may concern, you can fix this error quite easily yourself.

Line 1259 says:

foreach  my $llevel qw(CRITICAL WARNING UNKNOWN OK) { 

To fix this deprecation warning, simply put qw itsself in brackets like so:

foreach  my $llevel (qw(CRITICAL WARNING UNKNOWN OK)) { 

This will work for all three errors - just turn qw(foobar) into (qw(foobar)).

I would love to provide a patch but since nobody seems to be in charge of this project anymore, I will just leave this hint for others.

ronator avatar Feb 22 '17 16:02 ronator

Thanks, it worked for me.

sdbhabal avatar Jun 15 '18 04:06 sdbhabal

Worked here too, thanks!

Fonant avatar Mar 02 '23 10:03 Fonant