X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Fexigrep.src;h=faa5cb73b53a1bbdfd3cd75fcba9eb7003289f6d;hb=d953610fa77ec9a08fad9c1a183181079a79674e;hp=419fcb54ccf711121d46fea1afd985b6f4c979f8;hpb=9175a8d2ac50382af2045b37e7b054180f91f4e8;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/exigrep.src b/src/src/exigrep.src index 419fcb54c..faa5cb73b 100644 --- a/src/src/exigrep.src +++ b/src/src/exigrep.src @@ -1,8 +1,10 @@ -#! PERL_COMMAND -w +#! PERL_COMMAND +use warnings; use strict; +BEGIN { pop @INC if $INC[-1] eq '.' }; -# Copyright (c) 2007-2014 University of Cambridge. +# Copyright (c) 2007-2015 University of Cambridge. # See the file NOTICE for conditions of use and distribution. # Except when they appear in comments, the following placeholders in this @@ -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 ''); @@ -224,7 +226,7 @@ if (@ARGV) foreach (@ARGV) { my $filename = $_; - if ($filename =~ /\.(?:COMPRESS_SUFFIX)$/o) + if (-x 'ZCAT_COMMAND' && $filename =~ /\.(?:COMPRESS_SUFFIX)$/o) { open(LOG, "ZCAT_COMMAND $filename |") || die "Unable to zcat $filename: $!\n";