From 39e518db4ddb5449e236888dfd5a0c25b423eee2 Mon Sep 17 00:00:00 2001 From: Jorge Anton Date: Wed, 3 Dec 2014 07:28:24 +0100 Subject: [PATCH] Explicitly import module File::Which MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This ensures to get runtime errors if module is not installed Signed-off-by: Georg Schönberger --- check_lsi_raid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_lsi_raid b/check_lsi_raid index 6f4ac39..731f048 100755 --- a/check_lsi_raid +++ b/check_lsi_raid @@ -28,6 +28,7 @@ use strict; use warnings; use Getopt::Long qw(:config no_ignore_case); +use File::Which; our $VERBOSITY = 0; our $VERSION = "2.1"; @@ -1218,7 +1219,6 @@ MAIN: { if(defined($version)){ print $NAME . "\nVersion: ". $VERSION . "\n"; } # Check storcli tool if(!defined($storcli)){ - eval('use File::Which'); if($platform eq 'linux'){ $storcli = which('storcli'); if(!defined($storcli)){