From 9408c975fe199c4ef4d662dee05f4f684167b731 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Wed, 26 Feb 2014 08:07:10 +0100 Subject: utils.pm: use FindBin instead of awk to find the path to 'use lib utils.pm' is not valid Perl syntax: Bareword "utils" not allowed while "strict subs" in use at plugins-scripts/check_ircd.pl line 52. Bareword "pm" not allowed while "strict subs" in use at plugins-scripts/check_ircd.pl line 52. This makes it impossible to use the plugins directly from the git tree, e.g. while hacking on them. Using FindBin::Bin as the library path allows that, while preserving the original behaviour of adding the libexec path when the plugin is properly installed. --- plugins-scripts/check_rpc.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins-scripts/check_rpc.pl') diff --git a/plugins-scripts/check_rpc.pl b/plugins-scripts/check_rpc.pl index 474067e3..3a6f7179 100755 --- a/plugins-scripts/check_rpc.pl +++ b/plugins-scripts/check_rpc.pl @@ -20,7 +20,8 @@ # use strict; -use lib utils.pm; +use FindBin; +use lib "$FindBin::Bin"; use utils qw($TIMEOUT %ERRORS &print_revision &support); use vars qw($PROGNAME); my ($verbose,@proto,%prognum,$host,$response,$prognum,$port,$cmd,$progver,$state); -- cgit v1.2.3-74-g34f1