[check_postgres] Problem with perl 5.8.0
Chris Butler
chrisb at zedcore.com
Tue Sep 23 10:19:36 UTC 2008
Our monitoring server is running CentOS 3.9, which has perl version 5.8.0.
The latest version of check_postgres.pl fails to run on this version of
perl, with the following error:
Bareword "STDERR" not allowed while "strict subs" in use at check_postgres.pl line 919.
Execution of check_postgres.pl aborted due to compilation errors.
Line 919 is the following:
open my $oldstderr, '>&', STDERR or ndie "Could not dupe STDERR\n";
To fix, I replaced that with:
open my $oldstderr, '>&', \*STDERR or ndie "Could not dupe STDERR\n";
--
Chris Butler
Zedcore Systems Ltd
UK tel: 0114 238 1828 ext 72
More information about the Check_postgres
mailing list