check_postgres icon indicating copy to clipboard operation
check_postgres copied to clipboard

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

Open jw1u1 opened this issue 2 years ago • 1 comments

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.

jw1u1 avatar Jul 03 '23 13:07 jw1u1

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

Replace :

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

By :

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

m4hmudftw avatar Jun 03 '24 10:06 m4hmudftw

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)

sbrowne-godaddy avatar Nov 18 '24 23:11 sbrowne-godaddy

can't reproduce any more

jw1u1 avatar Mar 04 '25 17:03 jw1u1