bucardo / check_postgres

Nagios check_postgres plugin for checking status of PostgreSQL databases
http://bucardo.org/wiki/Check_postgres
Other
562 stars 175 forks source link

syntax error at /tmp/check_postgres.pl line 3438, near "->@*" #197

Open jw1u1 opened 1 year ago

jw1u1 commented 1 year ago

our $VERSION = '2.26.0';

check_postgres.pl -db postgres --action partman_premake Array found where operator expected at /tmp/check_postgres.pl line 3438, at end of line (Missing operator before ?) syntax error at /tmp/check_postgres.pl line 3438, near "->@*" Global symbol "$num" requires explicit package name at /tmp/check_postgres.pl line 3439. BEGIN not safe after errors--compilation aborted at /tmp/check_postgres.pl line 7512.

m4hmudftw commented 5 months ago

This is caused by your perl version (outdated), update it or :

Replace :

#my $num = $opt{$v}->@*;

By :

my $num = @{$opt{$v}};

sbrowne-godaddy commented 1 week ago

If that syntax is intended to stay, then perhaps the required version should be updated to suit. From:

use 5.10.0

Updated to:

use 5.24.0

(5.24.x being where Postfix dereferencing is no longer experimental)