perl paranoia about @INC
[exim.git] / src / src / exigrep.src
index bb994d7697f35ead2e493a354677eba7aeb24c37..faa5cb73b53a1bbdfd3cd75fcba9eb7003289f6d 100644 (file)
@@ -1,6 +1,8 @@
-#! PERL_COMMAND -w
+#! PERL_COMMAND
 
+use warnings;
 use strict;
+BEGIN { pop @INC if $INC[-1] eq '.' };
 
 # Copyright (c) 2007-2015 University of Cambridge.
 # See the file NOTICE for conditions of use and distribution.
@@ -174,7 +176,7 @@ sub detect_compressor_capable
     {
     if ($filename =~ /\.(?:$ext)$/)
       {
-      # Just die if compressor not found; if this occurrs in the middle of
+      # Just die if compressor not found; if this occurs in the middle of
       # two valid files with a lot of matches, error could easily be missed.
       die("Didn't find $ext decompressor for $filename\n")
         if ($compressors->{$ext}->{bin} eq '');