From: Vincent Pit Date: Tue, 7 Apr 2015 16:02:53 +0000 (-0300) Subject: Prefer splitpath/catpath over catfile X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=f04b35b97b754cddb0e780e41cf4be57a65963b8;p=perl%2Fmodules%2FScalar-Vec-Util.git Prefer splitpath/catpath over catfile --- diff --git a/Makefile.PL b/Makefile.PL index e519c64..1af2ae8 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -16,7 +16,11 @@ sub validate_exe { @candidates = $name; } else { (my $base, @args) = split ' ', $name; - @candidates = map File::Spec->catfile($_, $base), File::Spec->path; + for my $path_entry (File::Spec->path) { + my ($vol, $dir, $file) = File::Spec->splitpath($path_entry, 1); + next if defined $file and length $file; + push @candidates, File::Spec->catpath($vol, $dir, $base); + } } for my $path (@candidates) {