X-Git-Url: https://git.exim.org/users/jgh/exim.git/blobdiff_plain/50936073b7f81a4ca991809d02c77f6fd7813c80..6b3e96244682c63893ff3884b06bff68104ce2c8:/test/src/locate.pl?ds=sidebyside diff --git a/test/src/locate.pl b/test/src/locate.pl index 6f752c137..ba74e030b 100644 --- a/test/src/locate.pl +++ b/test/src/locate.pl @@ -1,4 +1,6 @@ #!/usr/bin/env perl + +use 5.010; use strict; use warnings; use File::Find; @@ -8,6 +10,7 @@ my @dirs = grep { /^\// && -d } split(/:/, $ENV{PATH}), qw( /bin /usr/bin /usr/sbin + /usr/lib /usr/libexec /usr/local/bin /usr/local/sbin @@ -39,7 +42,8 @@ sub locate { eval { find( sub { - return unless $tool eq $_ and -x $_ and -f _; + return $File::Find::prune = 1 unless -r -x -r; + return unless $tool eq $_ and -x and -f _; die { found => $File::Find::name }; }, @dirs