9 my @dirs = grep { /^\// && -d } split(/:/, $ENV{PATH}), qw(
20 my %path = map { $_ => locate($_, @dirs) } @ARGV;
26 foreach my $tool (keys %path) {
27 next if not defined $path{$tool};
28 print "$tool $path{$tool}\n";
30 unlink "bin.sys/$tool";
31 symlink $path{$tool}, "bin.sys/$tool"
32 or warn "bin.sys/$tool -> $path{$tool}: $!\n";
36 my ($tool, @dirs) = @_;
38 # use die to break out of the find as soon
44 return $File::Find::prune = 1 unless -r -x -r;
45 return unless $tool eq $_ and -x and -f _;
46 die { found => $File::Find::name };
53 return (ref $@ eq ref {} and $@->{found}) ? $@->{found} : undef;