diff options
author | Evgeni Golov <evgeni@golov.de> | 2014-02-26 07:07:10 (GMT) |
---|---|---|
committer | Jan Wagner <waja@cyconet.org> | 2014-02-27 19:56:50 (GMT) |
commit | 9408c975fe199c4ef4d662dee05f4f684167b731 (patch) | |
tree | f6c0cd753b6ed0ed61bd3f9731c718beb56a8e4d /plugins-scripts/check_ircd.pl | |
parent | dd1848ef300964fc73bfd983de22b17419dbb54f (diff) | |
download | monitoring-plugins-9408c975fe199c4ef4d662dee05f4f684167b731.tar.gz |
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.
Diffstat (limited to 'plugins-scripts/check_ircd.pl')
-rwxr-xr-x | plugins-scripts/check_ircd.pl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins-scripts/check_ircd.pl b/plugins-scripts/check_ircd.pl index 7612a0e..e45e9fc 100755 --- a/plugins-scripts/check_ircd.pl +++ b/plugins-scripts/check_ircd.pl | |||
@@ -49,7 +49,8 @@ use strict; | |||
49 | use Getopt::Long; | 49 | use Getopt::Long; |
50 | use vars qw($opt_V $opt_h $opt_t $opt_p $opt_H $opt_w $opt_c $verbose); | 50 | use vars qw($opt_V $opt_h $opt_t $opt_p $opt_H $opt_w $opt_c $verbose); |
51 | use vars qw($PROGNAME); | 51 | use vars qw($PROGNAME); |
52 | use lib utils.pm; | 52 | use FindBin; |
53 | use lib "$FindBin::Bin"; | ||
53 | use utils qw($TIMEOUT %ERRORS &print_revision &support &usage); | 54 | use utils qw($TIMEOUT %ERRORS &print_revision &support &usage); |
54 | 55 | ||
55 | # ----------------------------------------------------[ Function Prototypes ]-- | 56 | # ----------------------------------------------------[ Function Prototypes ]-- |