Просмотр исходного кода

Use FindBin consistently across Perl plugins

Use Perl's FindBin module to locate the path to utils.pm in
check_file_age.pl and check_mssql.pl, just as we do in other Perl
plugins.
Holger Weiss 12 лет назад
Родитель
Сommit
ae24aaeefb
2 измененных файлов с 4 добавлено и 2 удалено
  1. 2 1
      plugins-scripts/check_file_age.pl
  2. 2 1
      plugins-scripts/check_mssql.pl

+ 2 - 1
plugins-scripts/check_file_age.pl

@@ -25,7 +25,8 @@ use English;
 use Getopt::Long;
 use File::stat;
 use vars qw($PROGNAME);
-use lib ".";
+use FindBin;
+use lib "$FindBin::Bin";
 use utils qw (%ERRORS &print_revision &support);
 
 sub print_help ();

+ 2 - 1
plugins-scripts/check_mssql.pl

@@ -29,7 +29,8 @@
 use DBI;
 use DBD::Sybase;
 use Getopt::Long;
-use lib ".";
+use FindBin;
+use lib "$FindBin::Bin";
 use utils qw($TIMEOUT %ERRORS &print_revision &support);
 use strict;