Perl error with check_linux_raid.pl

Hugo van der Kooij hvdkooij at vanderkooij.org
Sat Nov 4 01:02:35 CET 2006


Hi,

After the last yum update of nagios-plugins I found myself staring at an 
error I could not fix right away. I think it is my lack of Perl knowledge 
that is to blame and hope some can tell me if my corrections are correct.

The error I got in Nagios was:
**ePN failed to compile 
/usr/lib/nagios/plugins/contrib/check_linux_raid.pl: "BEGIN not safe after 
errors--compilation aborted at (eval 2) line 27," at /usr/bin/p1.pl line 
155. 

The relevant lines were:

 1:	#!/usr/bin/perl -w
25:	use strict;
26:	use lib utils.pm;
27:	use utils qw(%ERRORS);

When I tried it by hand it reported:
./check_linux_raid.pl
Bareword "utils" not allowed while "strict subs" in use at ./check_linux_raid.pl line 26.
Bareword "pm" not allowed while "strict subs" in use at ./check_linux_raid.pl line 26.
BEGIN not safe after errors--compilation aborted at ./check_linux_raid.pl line 27.

I then changed it to:

25:	use strict;
26:	use utils qw(%ERRORS);

And this seems to do the trick for me.

Thank you for your patience.
Hugo.

-- 
	hvdkooij at vanderkooij.org	http://hvdkooij.xs4all.nl/
	    This message is using 100% recycled electrons.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list