check_mysql_health
check_mysql_health copied to clipboard
Use of qw(...) as parentheses is deprecated
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
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.
Thanks, it worked for me.
Worked here too, thanks!